├── .github └── CODEOWNERS ├── .gitignore ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── AppBundles ├── CreateSVFPlugin │ ├── CreateSVFPlugin.Inventor.addin │ ├── CreateSVFPlugin.X.manifest │ ├── CreateSVFPlugin.csproj │ ├── CreateSvfAutomation.cs │ ├── PackageContents.xml │ ├── PluginServer.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── CreateThumbnailPlugin │ ├── CreateThumbnailAutomation.cs │ ├── CreateThumbnailPlugin.Inventor.addin │ ├── CreateThumbnailPlugin.X.manifest │ ├── CreateThumbnailPlugin.csproj │ ├── PackageContents.xml │ ├── PluginServer.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── DataCheckerPlugin │ ├── DataCheckerAutomation.cs │ ├── DataCheckerPlugin.Inventor.addin │ ├── DataCheckerPlugin.X.manifest │ ├── DataCheckerPlugin.csproj │ ├── PackageContents.xml │ ├── PluginServer.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── EmptyExePlugin │ ├── EmptyExePlugin.cs │ ├── EmptyExePlugin.csproj │ ├── PackageContents.xml │ └── Properties │ │ └── AssemblyInfo.cs ├── ExportBOMPlugin │ ├── ExportBOMAutomation.cs │ ├── ExportBOMPlugin.Inventor.addin │ ├── ExportBOMPlugin.X.manifest │ ├── ExportBOMPlugin.csproj │ ├── PackageContents.xml │ ├── PluginServer.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ExportDrawingAsPdfPlugin │ ├── Automation.cs │ ├── ExportDrawingAsPdfPlugin.Inventor.addin │ ├── ExportDrawingAsPdfPlugin.X.manifest │ ├── ExportDrawingAsPdfPlugin.csproj │ ├── PackageContents.xml │ ├── PluginServer.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── ExtractParametersPlugin │ ├── ExtractParametersAutomation.cs │ ├── ExtractParametersPlugin.Inventor.addin │ ├── ExtractParametersPlugin.X.manifest │ ├── ExtractParametersPlugin.csproj │ ├── PackageContents.xml │ ├── PluginServer.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── InventorBinFolder.props.template ├── PluginUtilities │ ├── ParametersExtractor.cs │ ├── PluginUtilities.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── iLogicUtility.cs ├── RFAExportRCEPlugin │ ├── PackageContents.xml │ ├── PluginServer.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RFAExportRCEAutomation.cs │ ├── RFAExportRCEPlugin.Inventor.addin │ ├── RFAExportRCEPlugin.X.manifest │ └── RFAExportRCEPlugin.csproj ├── UpdateDrawingsPlugin │ ├── PackageContents.xml │ ├── PluginServer.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UpdateDrawingsAutomation.cs │ ├── UpdateDrawingsPlugin.Inventor.addin │ ├── UpdateDrawingsPlugin.X.manifest │ └── UpdateDrawingsPlugin.csproj └── UpdateParametersPlugin │ ├── PackageContents.xml │ ├── PluginServer.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── UpdateParametersAutomation.cs │ ├── UpdateParametersPlugin.Inventor.addin │ ├── UpdateParametersPlugin.X.manifest │ └── UpdateParametersPlugin.csproj ├── CONTRIBUTING.md ├── EMBEDDED-README.md ├── LICENSE ├── README.md ├── SampleModels ├── Wheel_multi_IDW_2023.zip └── WrenchForm_2023.zip ├── Shared ├── AutomationBase.cs ├── ExtractedBOM.cs ├── InventorParameters.cs ├── Message.cs └── SharedAssemblyInfo.cs ├── WebApplication.Tests ├── BomToCsvTest.cs ├── InitializerIntegrationTest.cs ├── InitializerTestBase.cs ├── Integration │ ├── AdoptProjectWithParametersTest.cs │ ├── ProjectServiceTest.cs │ └── XUnitUtils.cs ├── InviteOnlyCheckerTest.cs ├── NoDefaultProjectInitIntegrationTest.cs ├── PublisherTest.cs ├── StatsConversionTest.cs └── WebApplication.Tests.csproj ├── WebApplication ├── .gitignore ├── ClientApp │ ├── .eslintrc │ ├── .gitignore │ ├── .prettierrc │ ├── codecept.conf.js │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── Archive.svg │ │ ├── Assembly_icon.svg │ │ ├── SampleDrawingPdf.pdf │ │ ├── Thumbs.db │ │ ├── alert-24.svg │ │ ├── bike.png │ │ ├── document-drawing-24.svg │ │ ├── favicon.ico │ │ ├── file-spreadsheet-24.svg │ │ ├── index.html │ │ ├── logo-xs-white-BG.svg │ │ ├── logo.png │ │ ├── manifest.json │ │ └── products-and-services-24.svg │ ├── src │ │ ├── .stylelintrc │ │ ├── App.js │ │ ├── App.test.js │ │ ├── JobManager.js │ │ ├── Repository.js │ │ ├── actions │ │ │ ├── __snapshots__ │ │ │ │ └── uiFlagsActions.test.js.snap │ │ │ ├── adoptWithParamsActions.js │ │ │ ├── adoptWithParamsActions.test.js │ │ │ ├── bomActions.js │ │ │ ├── bomActions.test.js │ │ │ ├── deleteProjectActions.js │ │ │ ├── deleteProjectActions.test.js │ │ │ ├── downloadActions.js │ │ │ ├── downloadActions.test.js │ │ │ ├── drawingsListActions.js │ │ │ ├── drawingsListActions.test.js │ │ │ ├── notificationActions.js │ │ │ ├── parametersActions.js │ │ │ ├── parametersActions.test.js │ │ │ ├── profileActions.js │ │ │ ├── profileActions.test.js │ │ │ ├── projectListActions.js │ │ │ ├── projectListActions.test.js │ │ │ ├── uiFlagsActions.js │ │ │ ├── uiFlagsActions.test.js │ │ │ ├── uploadPackageActions.js │ │ │ └── uploadPackageActions.test.js │ │ ├── app.css │ │ ├── components │ │ │ ├── bom.css │ │ │ ├── bom.js │ │ │ ├── bom.test.js │ │ │ ├── bomUtils.js │ │ │ ├── checkBoxTableHeader.test.js │ │ │ ├── checkboxTable.js │ │ │ ├── checkboxTable.test.js │ │ │ ├── checkboxTableHeader.js │ │ │ ├── checkboxTableRow.js │ │ │ ├── checkboxTableRow.test.js │ │ │ ├── creditCost.js │ │ │ ├── creditCost.test.js │ │ │ ├── deleteProject.css │ │ │ ├── deleteProject.js │ │ │ ├── deleteProject.test.js │ │ │ ├── downloads.js │ │ │ ├── downloads.test.js │ │ │ ├── drawing.css │ │ │ ├── drawing.js │ │ │ ├── drawing.test.js │ │ │ ├── drawingsContainer.css │ │ │ ├── drawingsContainer.js │ │ │ ├── drawingsContainer.test.js │ │ │ ├── empty_state.svg │ │ │ ├── forgePdfView.css │ │ │ ├── forgePdfView.js │ │ │ ├── forgePdfView.test.js │ │ │ ├── forgePdfViewExtension.js │ │ │ ├── forgeView.css │ │ │ ├── forgeView.js │ │ │ ├── forgeView.test.js │ │ │ ├── hyperlink.js │ │ │ ├── hyperlink.test.js │ │ │ ├── message.css │ │ │ ├── message.js │ │ │ ├── message.test.js │ │ │ ├── modalDownloadProgress.js │ │ │ ├── modalDownloadProgress.test.js │ │ │ ├── modalFail.css │ │ │ ├── modalFail.js │ │ │ ├── modalFail.test.js │ │ │ ├── modalProgress.css │ │ │ ├── modalProgress.js │ │ │ ├── modalProgress.test.js │ │ │ ├── modalProgressUpload.js │ │ │ ├── modalProgressUpload.test.js │ │ │ ├── modalUpdateFailed.js │ │ │ ├── modalUpdateFailed.test.js │ │ │ ├── next.svg │ │ │ ├── no-data.svg │ │ │ ├── parameter.js │ │ │ ├── parameter.test.js │ │ │ ├── parametersContainer.css │ │ │ ├── parametersContainer.js │ │ │ ├── parametersContainer.test.js │ │ │ ├── prev.svg │ │ │ ├── projectList.css │ │ │ ├── projectList.js │ │ │ ├── projectList.test.js │ │ │ ├── projectSwitcher.css │ │ │ ├── projectSwitcher.js │ │ │ ├── projectSwitcher.test.js │ │ │ ├── reportUrl.js │ │ │ ├── reportUrl.test.js │ │ │ ├── shared.js │ │ │ ├── tabs.css │ │ │ ├── tabsContainer.js │ │ │ ├── tabsContainer.test.js │ │ │ ├── toolbar.css │ │ │ ├── toolbar.js │ │ │ ├── toolbar.test.js │ │ │ ├── uploadPackage.css │ │ │ ├── uploadPackage.js │ │ │ ├── uploadPackage.test.js │ │ │ ├── userDetails.css │ │ │ ├── userDetails.js │ │ │ └── userDetails.test.js │ │ ├── index.js │ │ ├── reducers │ │ │ ├── bomReducer.js │ │ │ ├── bomReducer.test.js │ │ │ ├── mainReducer.js │ │ │ ├── mainReducer.test.js │ │ │ ├── notificationReducer.js │ │ │ ├── notificationReducer.test.js │ │ │ ├── parametersReducer.js │ │ │ ├── parametersReducer.test.js │ │ │ ├── profileReducer.js │ │ │ ├── projectListReducer.test.js │ │ │ ├── projectListReducers.js │ │ │ ├── uiFlagsReducer.js │ │ │ ├── uiFlagsReducer.test.js │ │ │ ├── uiFlagsTestStates.js │ │ │ ├── updateParametersReducer.js │ │ │ └── updateParametersReducer.test.js │ │ ├── test │ │ │ ├── custom-test-env.js │ │ │ └── mockSignalR.js │ │ ├── ui-tests │ │ │ ├── BOM_content_test.js │ │ │ ├── RFA_Link_test.js │ │ │ ├── authentication_test.js │ │ │ ├── dataset │ │ │ │ ├── EndCap.ipt │ │ │ │ ├── NotSupportedAddins.zip │ │ │ │ ├── SimpleBox.zip │ │ │ │ ├── SimpleBox2asm.zip │ │ │ │ ├── invalid.ipt │ │ │ │ └── shelves.zip │ │ │ ├── download_drawing_test.js │ │ │ ├── downloads_test.js │ │ │ ├── drawing_test.js │ │ │ ├── elements_definition.js │ │ │ ├── embedded_adoption_test.js │ │ │ ├── embedded_view_test.js │ │ │ ├── iLogic_Parameters_test.js │ │ │ ├── parameter_notification_test.js │ │ │ ├── parameters_test.js │ │ │ ├── tabs_test.js │ │ │ ├── toolbar_test.js │ │ │ ├── update_failed_dialog_test.js │ │ │ ├── update_params_test.js │ │ │ ├── upload_IPT_test.js │ │ │ ├── upload_delete_test.js │ │ │ ├── upload_fail_log_test.js │ │ │ ├── upload_select_test.js │ │ │ ├── user_details_test.js │ │ │ ├── validate_report_link_test.js │ │ │ └── viewer_test.js │ │ └── utils │ │ │ ├── conversion.js │ │ │ └── conversion.test.js │ ├── steps.d.ts │ ├── steps_file.js │ └── teardown.js ├── Controllers │ ├── ClearSelf.cs │ ├── DownloadController.cs │ ├── JobsHub.cs │ ├── LoginController.cs │ ├── ProjectDataController.cs │ ├── ProjectsController.cs │ ├── ShowParametersChangedController.cs │ └── VersionController.cs ├── Definitions │ ├── AdditionalAppSettings.cs │ ├── AdoptProjectWithParametersPayload.cs │ ├── AdoptionData.cs │ ├── FdaProcessingException.cs │ ├── FdaStatsDTO.cs │ ├── ProcessingException.cs │ ├── ProcessingResult.cs │ ├── ProfileDTO.cs │ ├── ProjectDTO.cs │ ├── ProjectDTOBase.cs │ ├── ProjectInfo.cs │ ├── ProjectMetadata.cs │ ├── ProjectStateDTO.cs │ └── PublisherConfiguration.cs ├── Initializer.cs ├── Job │ ├── AdoptJobItem.cs │ ├── AdoptProjectWithParametersJobItem.cs │ ├── DrawingJobItem.cs │ ├── ExportDrawingPdfJobItem.cs │ ├── IResultSender.cs │ ├── JobItemBase.cs │ ├── ProcessingError.cs │ ├── RFAJobItem.cs │ └── UpdateModelJobItem.cs ├── Middleware │ ├── HeaderTokenHandler.cs │ ├── LocalCache.cs │ ├── RouteTokenHandler.cs │ ├── SvfHeaderTokenHandler.cs │ └── SvfRestore.cs ├── Migration.cs ├── MigrationJob.cs ├── Pages │ ├── Error.cshtml │ ├── Error.cshtml.cs │ └── _ViewImports.cshtml ├── Processing │ ├── AdoptProject.cs │ ├── AggregatedDefinition.cs │ ├── Arranger.cs │ ├── CreateBOM.cs │ ├── CreateRFA.cs │ ├── CreateSAT.cs │ ├── CreateSVF.cs │ ├── CreateThumbnail.cs │ ├── DataChecker.cs │ ├── ExportDrawing.cs │ ├── ExtractParameters.cs │ ├── FdaClient.cs │ ├── ForgeAppBase.cs │ ├── PostProcessing.cs │ ├── ProjectWork.cs │ ├── Publisher.cs │ ├── TransferData.cs │ ├── UpdateDrawings.cs │ ├── UpdateParameters.cs │ └── UpdateProject.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── ServiceConfigurator.cs ├── Services │ ├── AdoptProjectWithParametersPayloadProvider.cs │ ├── BucketPrefixProvider.cs │ ├── Exceptions │ │ └── ProjectAlreadyExistsException.cs │ ├── ForgeOSS.cs │ ├── IBucketKeyProvider.cs │ ├── IForgeOSS.cs │ ├── LoggedInUserBucketKeyProvider.cs │ ├── MigrationBucketKeyProvider.cs │ ├── ProfileProvider.cs │ ├── ProjectService.cs │ └── TokenService.cs ├── Startup.cs ├── State │ ├── NewProjectModel.cs │ ├── OssBucket.cs │ ├── Project.cs │ ├── ProjectStorage.cs │ ├── Uploads.cs │ └── UserResolver.cs ├── Utilities │ ├── Collections.cs │ ├── Crypto.cs │ ├── DtoGenerator.cs │ ├── ExtractedBomEx.cs │ ├── FileSystem.cs │ ├── ForgeEx.cs │ ├── GuidGenerator.cs │ ├── ITaskUtil.cs │ ├── InviteOnlyChecker.cs │ ├── Json.cs │ ├── LocalNameConverter.cs │ ├── OSSObjectNameProvider.cs │ ├── ResourceProvider.cs │ ├── TempFile.cs │ └── Web.cs ├── WebApplication.csproj ├── Worker.cs ├── appsettings.Development.json ├── appsettings.Local.template.json └── appsettings.json ├── about.md ├── aps-configurator-inventor.sln ├── cicd ├── BuildMachine │ ├── Add-Font.ps1 │ ├── Dockerfile │ ├── FontsToAdd.tar │ ├── InstallNode.ps1 │ └── README.md ├── Dockerfile.image ├── appsettings.Local.json ├── be-tests.ps1 ├── build.ps1 ├── buildAndTest.ps1 ├── commands.sh ├── common.ps1 ├── fe-tests.ps1 ├── linter.ps1 ├── ui-tests.ps1 └── waitForServer.ps1 ├── img ├── APIs.png ├── AppBundleZips.png ├── BuildSolution.png ├── DebugApp.png ├── Deploy │ ├── 0.png │ ├── 1.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ └── 9.png ├── DotnetRunInitialize.png ├── SuccessfulBuild.png └── architecture.png └── thumbnail.gif /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @andersco @erymski @Houmicek @hradilm @mivasi @obergrd @slavikz-centrum @msimko81 @Dc41f -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/WebApplication/WebApplication.csproj", 11 | "/property:GenerateFullPaths=true", 12 | "/consoleloggerparameters:NoSummary" 13 | ], 14 | "problemMatcher": "$msCompile" 15 | }, 16 | { 17 | "label": "publish", 18 | "command": "dotnet", 19 | "type": "process", 20 | "args": [ 21 | "publish", 22 | "${workspaceFolder}/WebApplication/WebApplication.csproj", 23 | "/property:GenerateFullPaths=true", 24 | "/consoleloggerparameters:NoSummary" 25 | ], 26 | "problemMatcher": "$msCompile" 27 | }, 28 | { 29 | "label": "publish-release", 30 | "command": "dotnet", 31 | "type": "process", 32 | "args": [ 33 | "publish", 34 | "${workspaceFolder}/WebApplication/WebApplication.csproj", 35 | "--configuration", 36 | "Release", 37 | "/property:GenerateFullPaths=true", 38 | "/consoleloggerparameters:NoSummary" 39 | ], 40 | "problemMatcher": "$msCompile", 41 | "dependsOn": "clean" 42 | }, 43 | { 44 | "label": "watch", 45 | "command": "dotnet", 46 | "type": "process", 47 | "args": [ 48 | "watch", 49 | "run", 50 | "${workspaceFolder}/WebApplication/WebApplication.csproj", 51 | "/property:GenerateFullPaths=true", 52 | "/consoleloggerparameters:NoSummary" 53 | ], 54 | "problemMatcher": "$msCompile" 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /AppBundles/CreateSVFPlugin/CreateSVFPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | {5b608275-a063-4323-ae3b-195eaabf2049} 4 | {5b608275-a063-4323-ae3b-195eaabf2049} 5 | CreateSVFPlugin 6 | CreateSVFPlugin 7 | CreateSVFPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/CreateSVFPlugin/CreateSVFPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/CreateSVFPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/CreateSVFPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("CreateSVFPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("6BEAAF6B-B4EB-41EA-A13C-7AFF3FFA03B7")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.3")] 10 | [assembly: AssemblyFileVersion("1.0.0.3")] 11 | -------------------------------------------------------------------------------- /AppBundles/CreateThumbnailPlugin/CreateThumbnailPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 | 2 | 3 | {9779EFBE-3CA7-45A6-AE90-DA85485DD674} 4 | {9779EFBE-3CA7-45A6-AE90-DA85485DD674} 5 | CreateThumbnailPlugin 6 | a Creates a thumbnail for an Inventor document 7 | CreateThumbnailPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/CreateThumbnailPlugin/CreateThumbnailPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AppBundles/CreateThumbnailPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AppBundles/CreateThumbnailPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("CreateThumbnailPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("252345e9-7631-43e9-bef4-959037ac2a5e")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.6")] 10 | [assembly: AssemblyFileVersion("1.0.0.6")] 11 | -------------------------------------------------------------------------------- /AppBundles/CreateThumbnailPlugin/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AppBundles/DataCheckerPlugin/DataCheckerPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 | 2 | 3 | {ae8a3c51-4366-42b3-8ba3-f78ea849584a} 4 | {ae8a3c51-4366-42b3-8ba3-f78ea849584a} 5 | DataCheckerPlugin 6 | a DataCheckerPlugin 7 | DataCheckerPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/DataCheckerPlugin/DataCheckerPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/DataCheckerPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/DataCheckerPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("Adoption Data Checker adding")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("f1c9d7e2-53a8-4e4e-af9e-931ca891715d")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.16")] 10 | [assembly: AssemblyFileVersion("1.0.0.16")] 11 | -------------------------------------------------------------------------------- /AppBundles/EmptyExePlugin/EmptyExePlugin.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | namespace EmptyPlugin 20 | { 21 | class Program 22 | { 23 | static void Main(string[] args) 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AppBundles/EmptyExePlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AppBundles/EmptyExePlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("EmptyPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("BBACEBE1-FF68-446A-9ABD-EB9FFD4649B2")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.0")] 10 | [assembly: AssemblyFileVersion("1.0.0.0")] 11 | -------------------------------------------------------------------------------- /AppBundles/ExportBOMPlugin/ExportBOMPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | {282d00a7-b2b5-488e-8a76-7c22280794a6} 4 | {282d00a7-b2b5-488e-8a76-7c22280794a6} 5 | ExportBOMPlugin 6 | Export BOM functionality 7 | ExportBOMPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/ExportBOMPlugin/ExportBOMPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/ExportBOMPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/ExportBOMPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("ExportBOMPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("f1c9d7e2-53a8-4e4e-af9e-931ca891715d")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.4")] 10 | [assembly: AssemblyFileVersion("1.0.0.4")] 11 | -------------------------------------------------------------------------------- /AppBundles/ExportDrawingAsPdfPlugin/ExportDrawingAsPdfPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | {6ace2032-7f14-4d7d-b3f4-bfd2e1190014} 4 | {6ace2032-7f14-4d7d-b3f4-bfd2e1190014} 5 | ExportDrawingAsPdfPlugin 6 | a ExportDrawingAsPdfPlugin 7 | ExportDrawingAsPdfPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/ExportDrawingAsPdfPlugin/ExportDrawingAsPdfPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/ExportDrawingAsPdfPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/ExportDrawingAsPdfPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("ExportDrawingAsPdfPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("f1c9d7e2-53a8-4e4e-af9e-931ca891715d")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.2")] 10 | [assembly: AssemblyFileVersion("1.0.0.2")] 11 | -------------------------------------------------------------------------------- /AppBundles/ExtractParametersPlugin/ExtractParametersPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | {824d9b00-545b-4929-accf-a47b7eca80a1} 4 | {824d9b00-545b-4929-accf-a47b7eca80a1} 5 | ExtractParametersPlugin 6 | a ExtractParametersPlugin 7 | ExtractParametersPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/ExtractParametersPlugin/ExtractParametersPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/ExtractParametersPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/ExtractParametersPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("ExtractParametersPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("f1c9d7e2-53a8-4e4e-af9e-931ca891715d")] 8 | 9 | [assembly: AssemblyVersion("2.0.0.14")] 10 | [assembly: AssemblyFileVersion("2.0.0.14")] 11 | -------------------------------------------------------------------------------- /AppBundles/InventorBinFolder.props.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PATH_TO_YOUR_INVENTOR_BIN 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/PluginUtilities/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("PluginUtilities")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("1b86189c-d714-4a83-b710-f669091c9c6c")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.0")] 10 | [assembly: AssemblyFileVersion("1.0.0.0")] 11 | 12 | -------------------------------------------------------------------------------- /AppBundles/RFAExportRCEPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/RFAExportRCEPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("RFAExportRCEPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("f1c9d7e2-53a8-4e4e-af9e-931ca891715e")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.0")] 10 | [assembly: AssemblyFileVersion("1.0.0.0")] 11 | -------------------------------------------------------------------------------- /AppBundles/RFAExportRCEPlugin/RFAExportRCEPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | {506ce94e-88ba-4891-b989-d4cf85ba0fff} 4 | {506ce94e-88ba-4891-b989-d4cf85ba0fff} 5 | RFAExportRCEPlugin 6 | a RFAExportRCEPlugin 7 | RFAExportRCEPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/RFAExportRCEPlugin/RFAExportRCEPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/UpdateDrawingsPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/UpdateDrawingsPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("UpdateDrawingsPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("f1c9d7e2-53a8-4e4e-af9e-931ca891715d")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.0")] 10 | [assembly: AssemblyFileVersion("1.0.0.0")] 11 | -------------------------------------------------------------------------------- /AppBundles/UpdateDrawingsPlugin/UpdateDrawingsPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | {7DD8A91A-B063-44F2-B93B-C80827E1E155} 4 | {7DD8A91A-B063-44F2-B93B-C80827E1E155} 5 | UpdateDrawingsPlugin 6 | Update Drawings functionality 7 | UpdateDrawingsPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/UpdateDrawingsPlugin/UpdateDrawingsPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppBundles/UpdateParametersPlugin/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppBundles/UpdateParametersPlugin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("UpdateParametersPlugin")] 5 | [assembly: AssemblyDescription("")] 6 | 7 | [assembly: Guid("6BEAAF6B-B4EB-41EA-A13C-7AFF3FFA03B7")] 8 | 9 | [assembly: AssemblyVersion("1.0.0.10")] 10 | [assembly: AssemblyFileVersion("1.0.0.10")] 11 | -------------------------------------------------------------------------------- /AppBundles/UpdateParametersPlugin/UpdateParametersPlugin.Inventor.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | {E20F6D0B-676E-40F7-8870-205A76A5B689} 4 | {E20F6D0B-676E-40F7-8870-205A76A5B689} 5 | UpdateParametersPlugin 6 | a UpdateParametersPlugin 7 | UpdateParametersPlugin.dll 8 | -------------------------------------------------------------------------------- /AppBundles/UpdateParametersPlugin/UpdateParametersPlugin.X.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Sorry, we are not accepting any PRs right now. 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Autodesk, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SampleModels/Wheel_multi_IDW_2023.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/SampleModels/Wheel_multi_IDW_2023.zip -------------------------------------------------------------------------------- /SampleModels/WrenchForm_2023.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/SampleModels/WrenchForm_2023.zip -------------------------------------------------------------------------------- /Shared/ExtractedBOM.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | // Data types from this file are shared between .NET 4.7+ and netcore projects, 20 | // so we need to have different attributes for Newtonsoft and netcore Json libraries. 21 | 22 | #if NETCOREAPP 23 | using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute; 24 | #else 25 | using JsonProperty = Newtonsoft.Json.JsonPropertyAttribute; 26 | #endif 27 | 28 | namespace Shared 29 | { 30 | public class Column 31 | { 32 | [JsonProperty("label")] 33 | public string Label { get; set; } 34 | 35 | [JsonProperty("numeric")] 36 | public bool? Numeric { get; set; } 37 | } 38 | 39 | public class ExtractedBOM 40 | { 41 | [JsonProperty("columns")] 42 | public Column[] Columns { get; set; } 43 | 44 | [JsonProperty("data")] 45 | public object[][] Data { get; set; } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Shared/InventorParameters.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | 22 | // Data types from this file are shared between .NET 4.7+ and netcore projects, 23 | // so we need to have different attributes for Newtonsoft and netcore Json libraries. 24 | 25 | #if NETCOREAPP 26 | using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute; 27 | #else 28 | using JsonProperty = Newtonsoft.Json.JsonPropertyAttribute; 29 | #endif 30 | 31 | 32 | namespace Shared 33 | { 34 | public class InventorParameter 35 | { 36 | [JsonProperty("value")] 37 | public string Value { get; set; } 38 | 39 | [JsonProperty("unit")] 40 | public string Unit { get; set; } 41 | 42 | [JsonProperty("values")] 43 | public string[] Values { get; set; } 44 | 45 | [JsonProperty("readonly")] 46 | public bool? ReadOnly { get; set; } 47 | 48 | [JsonProperty("label")] 49 | public string Label { get; set; } 50 | 51 | [JsonProperty("errormessage")] 52 | public string ErrorMessage { get; set; } 53 | } 54 | 55 | /// 56 | /// Format for data stored in `parameters.json`. 57 | /// 58 | public class InventorParameters : Dictionary 59 | { 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Shared/Message.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | // Data types from this file are shared between .NET 4.7+ and netcore projects, 20 | // so we need to have different attributes for Newtonsoft and netcore Json libraries. 21 | 22 | #if NETCOREAPP 23 | using JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute; 24 | #else 25 | using JsonProperty = Newtonsoft.Json.JsonPropertyAttribute; 26 | #endif 27 | 28 | namespace Shared 29 | { 30 | /// 31 | /// Message severity. 32 | /// 33 | public enum Severity 34 | { 35 | Info = 0, 36 | Warning = 1, 37 | Error = 2 38 | } 39 | 40 | public class Message 41 | { 42 | [JsonProperty("text")] 43 | public string Text { get; set; } 44 | 45 | [JsonProperty("severity")] 46 | public Severity Severity { get; set; } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Shared/SharedAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyConfiguration("")] 5 | [assembly: AssemblyCompany("Autodesk Inc.")] 6 | [assembly: AssemblyProduct("Forge Configurator Inventor")] 7 | [assembly: AssemblyCopyright("Copyright © Autodesk Inc. 2020")] 8 | [assembly: AssemblyTrademark("")] 9 | [assembly: AssemblyCulture("")] 10 | 11 | [assembly: ComVisible(true)] 12 | -------------------------------------------------------------------------------- /WebApplication.Tests/Integration/XUnitUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using Xunit.Abstractions; 4 | 5 | namespace WebApplication.Tests.Integration 6 | { 7 | internal static class XUnitUtils 8 | { 9 | public static void RedirectConsoleToXUnitOutput(ITestOutputHelper output) 10 | { 11 | Console.SetOut(new XUnitLogWriter(output)); 12 | } 13 | private class XUnitLogWriter : StringWriter 14 | { 15 | private readonly ITestOutputHelper _output; 16 | 17 | public XUnitLogWriter(ITestOutputHelper output) 18 | { 19 | _output = output; 20 | } 21 | 22 | public override void Write(string? value) 23 | { 24 | _output.WriteLine(value?.TrimEnd()); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WebApplication.Tests/WebApplication.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebApplication/.gitignore: -------------------------------------------------------------------------------- 1 | console.log 2 | AppBundles/ 3 | appsettings.Local.json 4 | metadata.json -------------------------------------------------------------------------------- /WebApplication/ClientApp/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "jest": true 6 | }, 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:jest/recommended", 10 | "plugin:react/recommended" 11 | ], 12 | "globals": { 13 | "Atomics": "readonly", 14 | "SharedArrayBuffer": "readonly" 15 | }, 16 | "parserOptions": { 17 | "ecmaFeatures": { 18 | "jsx": true 19 | }, 20 | "ecmaVersion": 2018, 21 | "sourceType": "module" 22 | }, 23 | "plugins": [ 24 | "jest" 25 | ], 26 | "parser": "@babel/eslint-parser", 27 | "rules": { 28 | "no-console": "warn", 29 | "linebreak-style": "off", 30 | "no-trailing-spaces": "warn", 31 | "semi": "warn", 32 | "no-var": "warn", 33 | "prefer-const": "warn", 34 | "react/prop-types": 0 // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md 35 | }, 36 | "settings": { 37 | "react": { 38 | "version": "detect" 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | .npmrc 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | .env -------------------------------------------------------------------------------- /WebApplication/ClientApp/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "useTabs": false, 4 | "tabWidth": 4 5 | } 6 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/codecept.conf.js: -------------------------------------------------------------------------------- 1 | const { setHeadlessWhen } = require('@codeceptjs/configure'); 2 | 3 | // turn on headless mode when running with HEADLESS=true environment variable 4 | // HEADLESS=true npx codecept run 5 | setHeadlessWhen(process.env.HEADLESS); 6 | 7 | //waitForNavigation: "networkidle0", 8 | //waitForAction: 500, 9 | //restart: false, 10 | 11 | const chromiumArgs = [ 12 | '--disable-web-security', 13 | '--ignore-certificate-errors', 14 | '--disable-infobars', 15 | '--allow-insecure-localhost', 16 | '--disable-device-discovery-notifications', 17 | '--window-size=1920,1080', 18 | '--window-posizition=200,0', 19 | '--no-sandbox' 20 | ]; 21 | 22 | exports.config = { 23 | tests: './src/ui-tests/*_test.js', 24 | output: './output', 25 | helpers: { 26 | Playwright: { 27 | url: 'https://localhost:5001', 28 | show: true, 29 | browser: 'chromium', 30 | chromium: {args: chromiumArgs}, 31 | waitForTimeout: 30000, 32 | MyHelper: { 33 | require: './src/ui-tests/helpers/playwright' 34 | } 35 | } 36 | }, 37 | include: { 38 | I: './steps_file.js' 39 | }, 40 | bootstrap: null, 41 | teardown: require("./teardown.js"), 42 | mocha: { bail: true }, 43 | name: 'ClientApp', 44 | plugins: { 45 | retryFailedStep: { 46 | enabled: true 47 | }, 48 | screenshotOnFail: { 49 | enabled: true 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true 4 | } 5 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/Archive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icons/modal/Archive 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/SampleDrawingPdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/public/SampleDrawingPdf.pdf -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/public/Thumbs.db -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/alert-24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/bike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/public/bike.png -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/document-drawing-24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/public/favicon.ico -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/file-spreadsheet-24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 23 | Design Automation Demo 24 | 25 | 26 | 29 |
30 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/logo-xs-white-BG.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/public/logo.png -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "aps-configurator-inventor", 3 | "name": "aps-configurator-inventor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/public/products-and-services-24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24px/products-and-services-24 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard", 3 | "rules": { 4 | "at-rule-empty-line-before": null, 5 | "indentation": null, 6 | "color-hex-case": null, 7 | "selector-list-comma-newline-after": null, 8 | "function-comma-space-after": null 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/actions/bomActions.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import repo from '../Repository'; 20 | import { addError, addLog } from './notificationActions'; 21 | 22 | const actionTypes = { 23 | BOM_UPDATED: 'BOM_UPDATED' 24 | }; 25 | 26 | export default actionTypes; 27 | 28 | export const updateBom = (projectId, bomData) => { 29 | return { 30 | type: actionTypes.BOM_UPDATED, 31 | projectId, 32 | bomData 33 | }; 34 | }; 35 | 36 | export const fetchBom = (project) => async (dispatch) => { 37 | if (! project.id) return; 38 | 39 | dispatch(addLog('get bom invoked')); 40 | try { 41 | const bomData = await repo.loadBom(project.bomJsonUrl); 42 | dispatch(addLog('bom received')); 43 | dispatch(updateBom(project.id, bomData)); 44 | } catch (error) { 45 | dispatch(addError('Failed to get bom for ' + project.id + '. (' + error + ')')); 46 | } 47 | }; 48 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/actions/deleteProjectActions.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import repo from '../Repository'; 20 | import { checkedProjects } from '../reducers/mainReducer'; 21 | import { updateProjectList } from './projectListActions'; 22 | import { clearCheckedProjects, showModalProgress } from './uiFlagsActions'; 23 | 24 | export const deleteProject = () => async (dispatch, getState) => { 25 | 26 | dispatch(showModalProgress(true)); 27 | 28 | try { 29 | await repo.deleteProjects(checkedProjects(getState())); 30 | const data = await repo.loadProjects(); 31 | dispatch(updateProjectList(data)); 32 | // the projects won't be there anymore (hopefully) 33 | dispatch(clearCheckedProjects()); 34 | dispatch(showModalProgress(false)); 35 | } catch (e) { 36 | dispatch(showModalProgress(false)); 37 | alert("Failed to delete project(s)"); 38 | } 39 | }; -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/actions/drawingsListActions.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import repo from '../Repository'; 20 | import {addError, addLog} from './notificationActions'; 21 | import {updateDrawingsList} from './uiFlagsActions'; 22 | 23 | export const fetchDrawingsList = (project) => async (dispatch) => { 24 | if(!project.id) return; 25 | 26 | dispatch(addLog('Load Drawings list invoked')); 27 | try { 28 | const data = await repo.loadDrawingsList(project.drawingsListUrl); 29 | dispatch(addLog('Drawings list received')); 30 | dispatch(updateDrawingsList(data)); 31 | } catch (error) { 32 | dispatch(addError('Failed to get Drawings list for ' + project.id + '. (' + error + ')')); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/actions/notificationActions.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | const actionTypes = { 20 | ADD_ERROR: 'ADD_ERROR', 21 | ADD_LOG: 'ADD_LOG' 22 | }; 23 | 24 | export default actionTypes; 25 | 26 | export const addError = error => { 27 | return { 28 | type: actionTypes.ADD_ERROR, 29 | info: error 30 | }; 31 | }; 32 | 33 | export const addLog = info => { 34 | return { 35 | type: actionTypes.ADD_LOG, 36 | info 37 | }; 38 | }; -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | html, body { 20 | display: flex; 21 | flex-flow: column; 22 | height: 100%; 23 | } 24 | 25 | .fullheight { 26 | display: flex; 27 | flex-flow: column; 28 | height: 100%; 29 | } 30 | 31 | #root { 32 | display: flex; 33 | flex-flow: column; 34 | height: 100%; 35 | } 36 | 37 | /* whole page scroll bars */ 38 | ::-webkit-scrollbar-thumb:hover { 39 | background-color: #80808080; /* color:#808080 80 opacity 50%*/ 40 | } 41 | 42 | ::-webkit-scrollbar-thumb { 43 | border-radius: 5px; 44 | background-color: #80808032; /* color:#808080 32 opacity 20%*/ 45 | } 46 | 47 | ::-webkit-scrollbar { 48 | width: 5px; 49 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/bom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | .bomEmpty { 20 | font-family: ArtifaktElement, sans-serif; 21 | padding: 50px; 22 | color: #3C3C3C; 23 | } 24 | 25 | .bomEmpty .title { 26 | font-size: 28px; 27 | margin: 25px; 28 | margin-top: 50px; 29 | text-align: center; 30 | } 31 | 32 | /* trick to change SVG color. https://stackoverflow.com/a/49627345 */ 33 | .bomEmpty .title svg path { 34 | fill: #FAA21B; 35 | } 36 | 37 | .bomEmpty .image { 38 | background-image: url('./no-data.svg'); 39 | background-position: center; 40 | background-repeat: no-repeat; 41 | height: 150px; 42 | } 43 | 44 | .bomEmpty .details { 45 | /* font-family: ArtifaktElement-Medium, sans-serif; */ 46 | font-weight: 600; 47 | margin: 25px; 48 | padding-left: 150px; 49 | } 50 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/bomUtils.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | // compute text width from canvas 20 | // don't want to test string width calc: 21 | /* istanbul ignore next */ 22 | export function getMaxColumnTextWidth(strings) { 23 | const font = "13px ArtifaktElement, sans-serif"; 24 | const canvas = document.createElement("canvas"); 25 | const context2d = canvas.getContext("2d"); 26 | context2d.font = font; 27 | let maxWidth = 0; 28 | strings.forEach(element => { 29 | const width = context2d.measureText(element).width; 30 | maxWidth = width>maxWidth ? width : maxWidth; 31 | }); 32 | 33 | // round to 10 times number, like 81.5 -> 90, 87.1 -> 90, etc 34 | const roundTo = 10; 35 | const rounded = (maxWidth % roundTo==0) ? maxWidth : maxWidth-maxWidth%roundTo + roundTo; 36 | return rounded; 37 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/checkboxTableRow.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import React, { Component } from 'react'; 20 | import { connect } from 'react-redux'; 21 | import Checkbox from '@hig/checkbox'; 22 | import { checkedProjects } from '../reducers/mainReducer'; 23 | 24 | export class CheckboxTableRow extends Component { 25 | 26 | onChange(checked) { 27 | const { rowData } = this.props; 28 | this.props.onChange( checked, rowData ); 29 | } 30 | 31 | render() { 32 | const { rowData, selectable } = this.props; 33 | const isChecked = this.props.checkedProjects.includes(rowData.id); 34 | 35 | return ( 36 |
37 | {selectable && {this.onChange(checked); }} 39 | checked={isChecked} 40 | />} 41 |
42 | ); 43 | } 44 | } 45 | 46 | /* istanbul ignore next */ 47 | export default connect(function (store) { 48 | return { 49 | checkedProjects: checkedProjects(store) 50 | }; 51 | })(CheckboxTableRow); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/creditCost.test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import React from 'react'; 20 | import Enzyme, { shallow } from 'enzyme'; 21 | import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; 22 | import { CreditCost } from './creditCost'; 23 | 24 | Enzyme.configure({ adapter: new Adapter() }); 25 | 26 | describe('Show processing stats and cost', () => { 27 | it('Shows the cost and time when run FDA was invoked', () => { 28 | const stats = { credits: 11, processing: 2 }; 29 | const wrapper = shallow(); 30 | const texts = wrapper.find('Typography'); 31 | expect(texts.someWhere((t) => t.html().includes('Consumed resources'))).toBeTruthy(); 32 | expect(wrapper.instance().props.stats).toEqual(stats); 33 | }); 34 | 35 | it('Shows the last cost when cached result was used', () => { 36 | const stats = { credits: 3 }; 37 | const wrapper = shallow(); 38 | const texts = wrapper.find('Typography'); 39 | expect(texts.someWhere((t) => t.html().includes('Used cache'))).toBeTruthy(); 40 | expect(wrapper.instance().props.stats).toEqual(stats); 41 | }); 42 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/deleteProject.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | #deleteProjectModal .buttonsContainer { 20 | display: flex; 21 | flex-flow: row-reverse; 22 | padding-bottom: 0; 23 | } 24 | 25 | #deleteProjectModal .buttonsContainer button { 26 | width: 102px; 27 | } 28 | 29 | #delete_ok_button { 30 | background-color: red; 31 | } 32 | 33 | .deleteProjectListContainer { 34 | height: 116px; 35 | overflow-y: auto; 36 | } 37 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/drawing.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | .drawingContainer { 20 | height: 100%; 21 | } 22 | 23 | .drawingContainer.empty { 24 | background-image: url('./empty_state.svg'); 25 | background-position: center; 26 | background-repeat: no-repeat; 27 | } 28 | 29 | .drawingEmptyText { 30 | transform: translateY(55vh); 31 | color: rgb(60, 60, 60); 32 | font-size: 20px; 33 | font-family: ArtifaktElement-Medium; 34 | font-weight: 500; 35 | text-align: center; 36 | line-height: 26px; 37 | } 38 | 39 | .drawingsContent { 40 | border-style: solid; 41 | border-width: 8px; 42 | border-color: red;/*#D9D9D9;*/ 43 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/forgePdfView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | /* the same styles*/ 20 | .drawing-icon-prev, .drawing-icon-next { 21 | background-color: #f4f4f4; 22 | -webkit-mask-size: 22px; 23 | mask-size: 22px; 24 | -webkit-mask-repeat: no-repeat; 25 | mask-repeat: no-repeat; 26 | -webkit-mask-position: center; 27 | mask-position: center; 28 | } 29 | 30 | /*if button is hovered, we need to set right icon background-color to have svg colored correctly*/ 31 | .drawing-button-prev:hover .drawing-icon-prev, .drawing-button-next:hover .drawing-icon-next { 32 | background-color: #00bfff; 33 | } 34 | 35 | .drawing-icon-prev { 36 | -webkit-mask-image: url(./prev.svg); 37 | mask-image: url(./prev.svg); 38 | } 39 | 40 | .drawing-icon-next { 41 | -webkit-mask-image: url(./next.svg); 42 | mask-image: url(./next.svg); 43 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/forgeView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | .viewer { 20 | background-color: white; 21 | width: 100%; 22 | position: relative; 23 | border-style: solid; 24 | border-width: 8px; 25 | border-color: #D9D9D9; 26 | height: 100%; 27 | } 28 | 29 | .modelContainer { 30 | width: 100%; 31 | } 32 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/hyperlink.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import React, { Component } from 'react'; 20 | import Typography from "@hig/typography"; 21 | 22 | export class HyperLink extends Component { 23 | 24 | componentDidMount() { 25 | if (this.props.onAutostart) 26 | this.props.onAutostart(this.downloadHyperlink); 27 | } 28 | 29 | render() { 30 | const downloadProps = {}; 31 | if(this.props.download) { 32 | downloadProps['download'] = ''; 33 | } 34 | 35 | const downloadLink = { 36 | e.stopPropagation(); 37 | if (this.props.onUrlClick) this.props.onUrlClick(); 38 | }} ref = {(h) => { 39 | this.downloadHyperlink = h; 40 | }} {...downloadProps}>{this.props.link}; 41 | 42 | return( 43 | 44 | {this.props.prefix}{downloadLink}{this.props.suffix} 45 | 46 | ); 47 | } 48 | } 49 | 50 | export default HyperLink; -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/message.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | .verticalseparator { 20 | width: 1px; 21 | background: #9bd5ef; 22 | margin: 8px 0 8px 24px; 23 | } 24 | 25 | .dontshowplaceholder { 26 | margin-top: auto; 27 | padding-left: 24px; 28 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/modalFail.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | .modalFailContent { 20 | height: 119px; 21 | } 22 | 23 | .modalFailButtonsContainer { 24 | display: flex; 25 | flex-flow: row-reverse; 26 | } 27 | 28 | #customHeader { 29 | font-size: 20px; 30 | font-weight: 600; 31 | line-height: 1.666; 32 | display: flex; 33 | flex-direction: column; 34 | justify-content: center; 35 | border-bottom: 1px solid rgba(60,60,60,0.25); 36 | min-height: 60px; 37 | z-index: 1002; 38 | } 39 | 40 | #customHeader .customHeaderContent { 41 | margin: 0 24px; 42 | display: flex; 43 | justify-content: space-between; 44 | } 45 | 46 | #customHeader .customHeaderContent .title { 47 | display: flex; 48 | } 49 | 50 | #customHeader .customHeaderContent .title .errorIcon { 51 | margin: auto; 52 | } 53 | 54 | svg.errorIcon path { 55 | fill: #ec4a41; 56 | } 57 | 58 | #customHeader button { 59 | background-color: transparent; 60 | height: calc(20px + (8px * 2)); 61 | width: calc(20px + (8px * 2)); 62 | right: -10px; 63 | } 64 | 65 | .assemblyText { 66 | font-weight: bold; 67 | margin-right: 10px; 68 | } 69 | 70 | .logContainer { 71 | margin-top: 10px; 72 | } 73 | 74 | .errorMessage { 75 | padding-top: 7px; 76 | overflow-y: auto; 77 | height: 90px; 78 | } 79 | 80 | .errorMessageTitle { 81 | padding-top: 7px; 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/next.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/prev.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/projectList.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | #project-list .tabContainer { 20 | background-color: white; 21 | font-family: ArtifaktElement, sans-serif; 22 | } 23 | 24 | #project-list .hidden { 25 | display: none; 26 | } 27 | 28 | #project-list .actionButtonContainer.hidden { 29 | padding: 0; 30 | } 31 | 32 | #project-list .actionButtonContainer { 33 | display: flex; 34 | flex-flow: row; 35 | padding: 20px 0 10px 0; 36 | margin-left: 76px; 37 | vertical-align: middle; 38 | } 39 | 40 | #project-list .actionButtonContainer button { 41 | /* following are to override IconButton strange behavior */ 42 | outline: none; 43 | border-color: transparent; 44 | box-shadow: none; 45 | } 46 | 47 | #project-list .actionButtonContainer .verticalSpacer { 48 | height: 40px; 49 | width: 1px; 50 | border-left: gainsboro 1px solid; 51 | margin: 0 12px 0 12px; 52 | } 53 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/projectSwitcher.css: -------------------------------------------------------------------------------- 1 | #PAS ul>li:hover { 2 | background-color: #f5f5f5; 3 | outline: none; 4 | } 5 | 6 | #PAS div[role="button"] { 7 | outline: none; 8 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/reportUrl.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import React, { Component } from 'react'; 20 | import { connect } from 'react-redux'; 21 | import { getReportUrl } from '../reducers/mainReducer'; 22 | import HyperLink from './hyperlink'; 23 | 24 | export class ReportUrl extends Component { 25 | render() { 26 | const reportUrl = 27 | this.props.reportUrl !== undefined ? this.props.reportUrl : null; 28 | const showReportUrl = reportUrl !== null; 29 | 30 | // Return nothing if there is no report URL to render 31 | if (!showReportUrl) return (null); 32 | 33 | return ( 34 | 35 |
36 | 37 |
38 |
39 | ); 40 | } 41 | } 42 | 43 | /* istanbul ignore next */ 44 | export default connect(function (store) { 45 | return { 46 | reportUrl: getReportUrl(store), 47 | }; 48 | })(ReportUrl); 49 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/reportUrl.test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import React from 'react'; 20 | import Enzyme, { shallow } from 'enzyme'; 21 | import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; 22 | import { ReportUrl } from './reportUrl'; 23 | 24 | Enzyme.configure({ adapter: new Adapter() }); 25 | 26 | describe('Show report url', () => { 27 | it('Shows report url when work item finishes', () => { 28 | const props = { reportUrl: 'http://example.com' }; 29 | const wrapper = shallow(); 30 | const hyperlink = wrapper.find('HyperLink'); 31 | expect(hyperlink.prop('href')).toEqual(props.reportUrl); 32 | expect(wrapper).toEqual({}); 33 | }); 34 | 35 | it('Do not show report url', () => { 36 | const props = { reportUrl: null }; 37 | const wrapper = shallow(); 38 | const hyperlink = wrapper.find('HyperLink'); 39 | expect(hyperlink.contains('HyperLink')).toBe(false); 40 | }); 41 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/shared.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | // use fixed version of the viewer to avoid usage of untested viewer version 20 | const viewerVersion = '7.96.0'; 21 | 22 | // in case you need to debug Viewer script/css - remove '.min' from the URLs 23 | export const viewerCss = `https://developer.api.autodesk.com/modelderivative/v2/viewers/${viewerVersion}/style.min.css`; 24 | export const viewerJs = `https://developer.api.autodesk.com/modelderivative/v2/viewers/${viewerVersion}/viewer3D.min.js`; 25 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/tabs.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | .tabsContainer { 20 | display: flex; 21 | flex-flow: column; 22 | height: 100%; 23 | padding-top: 29px; 24 | overflow: hidden; 25 | } 26 | 27 | .tabContent { 28 | border-style: solid; 29 | border-width: 8px; 30 | border-color: #D9D9D9; 31 | } 32 | 33 | .tabContent#model, 34 | .tabContent#drawing 35 | { 36 | border-style: none; 37 | } 38 | 39 | .inRow { 40 | display: flex; 41 | flex-direction: row; 42 | } 43 | 44 | /* set style for an element made by React component */ 45 | .fullheight__content { 46 | overflow: hidden; 47 | } 48 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/tabsContainer.test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment ./src/test/custom-test-env.js 3 | */ 4 | 5 | ///////////////////////////////////////////////////////////////////// 6 | // Copyright (c) Autodesk, Inc. All rights reserved 7 | // Written by Autodesk Design Automation team for Inventor 8 | // 9 | // Permission to use, copy, modify, and distribute this software in 10 | // object code form for any purpose and without fee is hereby granted, 11 | // provided that the above copyright notice appears in all copies and 12 | // that both that copyright notice and the limited warranty and 13 | // restricted rights notice below appear in all supporting 14 | // documentation. 15 | // 16 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 17 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 18 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 19 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 20 | // UNINTERRUPTED OR ERROR FREE. 21 | ///////////////////////////////////////////////////////////////////// 22 | 23 | import React from 'react'; 24 | import Enzyme, { shallow } from 'enzyme'; 25 | import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; 26 | import { TabsContainer } from './tabsContainer'; 27 | 28 | Enzyme.configure({ adapter: new Adapter() }); 29 | 30 | const updateActivetabIndexMock = jest.fn(); 31 | 32 | describe('tabsContainer', () => { 33 | it('handles tab change', () => { 34 | const wrapper = shallow(); 35 | const tabsWrapper = wrapper.find('Tabs'); 36 | tabsWrapper.simulate('TabChange', 3); 37 | expect(updateActivetabIndexMock).toHaveBeenCalledWith(3); 38 | }); 39 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/toolbar.css: -------------------------------------------------------------------------------- 1 | #ProfileActionHolder button>span { 2 | background-color: white; 3 | } 4 | 5 | #ProfileActionHolder button { 6 | outline: none; 7 | } -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/uploadPackage.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | #uploadPackageModal .fileBrowseContainer { 20 | display: flex; 21 | } 22 | 23 | #uploadPackageModal .fileBrowseContainer button { 24 | /* following are to override IconButton strange behavior */ 25 | outline: none; 26 | border-color: transparent; 27 | box-shadow: none; 28 | } 29 | 30 | #uploadPackageModal .stretch { 31 | width: -webkit-fill-available; 32 | } 33 | 34 | #uploadPackageModal .browseButton { 35 | display: flex; 36 | flex-flow: row; 37 | align-items: flex-end; 38 | } 39 | 40 | #uploadPackageModal .browseButton label { 41 | margin: 0; 42 | height: 36px; /* to match inner content (the button) exactly */ 43 | } 44 | 45 | #packageFileInput { 46 | display: none; 47 | } 48 | 49 | #uploadPackageModal .buttonsContainer { 50 | display: flex; 51 | flex-flow: row-reverse; 52 | padding-bottom: 0; 53 | } 54 | 55 | #uploadPackageModal .buttonsContainer button { 56 | width: 102px; 57 | } 58 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/userDetails.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Autodesk, Inc. All rights reserved 3 | * Written by Autodesk Design Automation team for Inventor 4 | * 5 | * Permission to use, copy, modify, and distribute this software in 6 | * object code form for any purpose and without fee is hereby granted, 7 | * provided that the above copyright notice appears in all copies and 8 | * that both that copyright notice and the limited warranty and 9 | * restricted rights notice below appear in all supporting 10 | * documentation. 11 | * 12 | * AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | * AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | * DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | * UNINTERRUPTED OR ERROR FREE. 17 | */ 18 | 19 | span.user { 20 | font-size: 11px; 21 | margin-left: 12px; 22 | } 23 | 24 | .avatar-custom-style { 25 | margin-left: auto !important; 26 | margin-right: 12px !important; 27 | } 28 | 29 | span.avatar-custom-style { 30 | background-color: white; 31 | } 32 | 33 | span.username, span.hyperlink { 34 | width: 70px; 35 | height: 20px; 36 | font-size: 14px; 37 | font-family: ArtifaktElement, sans-serif; 38 | line-height: 20px; 39 | margin: 12px; 40 | } 41 | 42 | span.username { 43 | color: rgb(60, 60, 60); 44 | font-weight: 700; 45 | } 46 | 47 | div.auth-button { 48 | width: 244px; 49 | height: 36px; 50 | background: rgba(255, 255, 255, 0); 51 | border: 1px solid rgb(128, 128, 128); 52 | border-radius: 2px; 53 | margin: 12px; 54 | cursor: pointer; 55 | text-align: center; 56 | } 57 | 58 | span.auth-button-text { 59 | line-height: 36px; 60 | } 61 | 62 | #hiddenLogoutFrame { 63 | visibility: hidden; 64 | display: block; 65 | height: 0; 66 | width: 0; 67 | } 68 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/components/userDetails.test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import React from 'react'; 20 | import Enzyme, { shallow } from 'enzyme'; 21 | import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; 22 | import { UserDetails } from './userDetails'; 23 | 24 | Enzyme.configure({ adapter: new Adapter() }); 25 | 26 | describe('user dialog', () => { 27 | 28 | it('check there is contained a hyperlink to README.md', () => { 29 | 30 | const props = { 31 | profile: { 32 | name: 'profileName', 33 | avatarUrl: 'avatarUrl', 34 | isLoggedIn: true, 35 | } 36 | }; 37 | 38 | const wrapper = shallow(); 39 | 40 | const hyperlinkSpan = wrapper.find('.hyperlink'); 41 | 42 | expect(hyperlinkSpan.length).toBe(1); 43 | expect(hyperlinkSpan.find('a').prop('href')).toContain('about.md'); 44 | }); 45 | 46 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/reducers/bomReducer.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import bomActionTypes from "../actions/bomActions"; 20 | 21 | export const initialState = {}; 22 | 23 | export const getBom = function(projectId, state) { 24 | return state[projectId]; 25 | }; 26 | 27 | export default function(state = initialState, action) { 28 | 29 | switch(action.type) { 30 | case bomActionTypes.BOM_UPDATED: { 31 | const newState = { ...state }; 32 | newState[action.projectId] = action.bomData; 33 | return newState; 34 | } 35 | default: 36 | return state; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/reducers/notificationReducer.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import notificationTypes from '../actions/notificationActions'; 20 | 21 | export const initialState = [ 22 | '0 Errors' 23 | ]; 24 | 25 | export const notificationReducer = function(state = initialState, action) { 26 | switch(action.type) { 27 | case notificationTypes.ADD_ERROR: { 28 | return ([ ...state, action.info ]); 29 | } 30 | case notificationTypes.ADD_LOG: { 31 | return ([ ...state, action.info ]); 32 | } 33 | default: 34 | return state; 35 | } 36 | }; -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/reducers/notificationReducer.test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import {notificationReducer, initialState} from './notificationReducer'; 20 | import {addError, addLog} from '../actions/notificationActions'; 21 | 22 | describe('notification reducer', () => { 23 | test('should return the initial state', () => { 24 | expect(notificationReducer(undefined, {})).toEqual(initialState); 25 | }); 26 | 27 | test('handles adding an error', () => { 28 | const newText = 'Some Error'; 29 | const stateWithError = [ 30 | '0 Errors', 31 | newText 32 | ]; 33 | expect(notificationReducer(initialState, addError(newText))).toEqual(stateWithError); 34 | }); 35 | 36 | test('handles adding a log', () => { 37 | const newText = 'A Log'; 38 | const stateWithLog = [ 39 | '0 Errors', 40 | newText 41 | ]; 42 | expect(notificationReducer(initialState, addLog(newText))).toEqual(stateWithLog); 43 | }); 44 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/reducers/parametersReducer.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import parameterActionTypes from "../actions/parametersActions"; 20 | 21 | export const initialState = {}; 22 | 23 | export const getParameters = function(projectId, state) { 24 | return state[projectId]; 25 | }; 26 | 27 | export default function(state = initialState, action) { 28 | 29 | switch(action.type) { 30 | case parameterActionTypes.PARAMETERS_UPDATED: { 31 | const newState = { ...state }; 32 | newState[action.projectId] = action.parameters; 33 | return newState; 34 | } 35 | 36 | case parameterActionTypes.PARAMETER_EDITED: // do nothing here! 37 | case parameterActionTypes.PARAMETERS_RESET: // do nothing here! 38 | default: 39 | return state; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/reducers/profileReducer.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import actions from '../actions/profileActions'; 20 | 21 | export const initialState = { 22 | isLoggedIn: false, 23 | name: "Anonymous", 24 | avatarUrl: "logo-xs-white-BG.svg" 25 | }; 26 | 27 | export default function(state = initialState, action) { 28 | switch(action.type) { 29 | case actions.PROFILE_LOADED: { 30 | return { isLoggedIn: action.isLoggedIn, name: action.profile.name, avatarUrl: action.profile.avatarUrl}; 31 | } 32 | default: 33 | return state; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/reducers/uiFlagsTestStates.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | export const testState = { 20 | parametersEditedMessageClosed: 1, 21 | parametersEditedMessageRejected: 2, 22 | modalProgressShowing: 3, 23 | updateFailedShowing: 4, 24 | loginFailedShowing: 5, 25 | downloadFailedShowing: 6, 26 | downloadDrawingFailedShowing: 7, 27 | errorData: { type:1, reportUrl: 'https://foo' }, 28 | downloadProgressShowing: 9, 29 | downloadProgressTitle: "Download Title", 30 | downloadUrl: 11, 31 | showUploadPackage: 13, 32 | uploadProgressShowing: 14, 33 | uploadProgressStatus: 'done', 34 | package: { file: null, root: '', assemblies: null }, 35 | uploadFailedShowing: 16, 36 | activeTabIndex: 17, 37 | projectAlreadyExists: 18, 38 | showDeleteProject: 19, 39 | checkedProjects: [20], 40 | drawingProgressShowing: 21, 41 | drawingUrls: { "1" : "url1", "2" : "url2" }, 42 | stats: { "1" : { credits: 3, processing: 2 }}, 43 | activeDrawing: "1", 44 | drawings: [ "1", "2", "3" ], 45 | reportUrl: "http://report", 46 | adoptWithParamsProgressShowing: true, 47 | adoptWithParamsFailed: false, 48 | embeddedModeUrl: "http://embedded.json" 49 | }; 50 | 51 | export const fullState = { 52 | uiFlags: testState 53 | }; -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/test/custom-test-env.js: -------------------------------------------------------------------------------- 1 | const Environment = require('jest-environment-jsdom'); 2 | 3 | /** 4 | * A custom environment to set the TextDecoder that is required by unzipit. 5 | */ 6 | // eslint-disable-next-line no-undef 7 | module.exports = class CustomTestEnvironment extends Environment { 8 | async setup() { 9 | await super.setup(); 10 | if (typeof this.global.TextDecoder === 'undefined') { 11 | const { TextDecoder } = require('util'); 12 | this.global.TextDecoder = TextDecoder; 13 | } 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/test/mockSignalR.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | import * as signalR from '@aspnet/signalr'; 20 | 21 | const connectionMock = { 22 | onHandlers: {}, 23 | start: function() {}, 24 | on: function(name, fn) { 25 | this.onHandlers[name] = fn; 26 | }, 27 | invoke: function() {}, 28 | stop: function() {}, 29 | simulateComplete: function(data, stats) { 30 | this.onHandlers['onComplete'](data, stats); 31 | }, 32 | simulateErrorWithReport: function(jobId, link) { 33 | this.onHandlers['onError']({ errorType: 1, jobId, reportUrl: link }); 34 | }, 35 | simulateErrorWithMessage: function(jobId, message, title) { 36 | this.onHandlers['onError']({ errorType: 2, jobId, messages: [message], title }); 37 | } 38 | }; 39 | 40 | function hubConnectionBuilder() {} 41 | 42 | hubConnectionBuilder.prototype.withUrl = function(/*url*/) { 43 | return { 44 | configureLogging: function(/*trace*/) { 45 | return { build: function() { return connectionMock; }}; 46 | } 47 | }; 48 | }; 49 | 50 | // eslint-disable-next-line no-import-assign 51 | signalR.HubConnectionBuilder = hubConnectionBuilder; 52 | 53 | export default connectionMock; -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/authentication_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-console */ 20 | /* eslint-disable no-undef */ 21 | 22 | Feature('Authentication'); 23 | 24 | Before(({ I }) => { 25 | I.amOnPage('/'); 26 | }); 27 | 28 | Scenario('check Sign-in and Sign-out workflow', async ({ I }) => { 29 | await I.signIn(); 30 | 31 | I.signOut(); 32 | }); 33 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/dataset/EndCap.ipt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/src/ui-tests/dataset/EndCap.ipt -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/dataset/NotSupportedAddins.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/src/ui-tests/dataset/NotSupportedAddins.zip -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/dataset/SimpleBox.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/src/ui-tests/dataset/SimpleBox.zip -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/dataset/SimpleBox2asm.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/src/ui-tests/dataset/SimpleBox2asm.zip -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/dataset/invalid.ipt: -------------------------------------------------------------------------------- 1 | this is not valid ipt file. -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/dataset/shelves.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/WebApplication/ClientApp/src/ui-tests/dataset/shelves.zip -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/downloads_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-undef */ 20 | const locators = require('./elements_definition.js'); 21 | 22 | Feature('Downloads'); 23 | 24 | Before(({ I }) => { 25 | I.amOnPage('/'); 26 | }); 27 | 28 | Scenario('should check switch to downloads tab shows the downloads links', async ({ I }) => { 29 | 30 | // select the Wheel project 31 | I.selectProject('Wheel'); 32 | I.see('Downloads', locators.downloadsTab); 33 | I.goToDownloadsTab(); 34 | I.waitForElement('.BaseTable'); 35 | 36 | // check number of rows in the Downloads tab 37 | I.seeNumberOfElements('.BaseTable__row', 4); 38 | 39 | // all expected download types are available 40 | I.see('IAM', '.BaseTable__row-cell a'); 41 | I.see('RFA', '.BaseTable__row-cell a'); 42 | I.see('BOM', '.BaseTable__row-cell a'); 43 | I.see('Drawing', '.BaseTable__row-cell a'); 44 | 45 | // check icons 46 | I.seeNumberOfElements({ css: '[src="products-and-services-24.svg"]'}, 3); 47 | I.seeNumberOfElements({ css: '[src="file-spreadsheet-24.svg"]'}, 1); 48 | }); 49 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/embedded_adoption_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-undef */ 20 | const locators = require('./elements_definition.js'); 21 | 22 | Feature('Embedded Adoption'); 23 | 24 | // This test uses existing json pointing to existing dataset. 25 | // It's purpose is just to verify the first step of adoption. it's fine if it uses cached data - 26 | // - the embedded adoption processing is already tested on server side. 27 | Before(({ I }) => { 28 | I.amOnPage('/?url=https://inventorio-dev-holecep.s3.us-west-2.amazonaws.com/Interaction/wrench_v2.json'); 29 | }); 30 | 31 | Scenario('Should check the adoption is started and finished', async ({ I }) => { 32 | // check if exists the Model tab 33 | I.see("Model", locators.modelTab); 34 | 35 | // viewer loaded 36 | const viewerModelSelector = '#ViewerModelStructurePanel'; 37 | I.waitForElement(locators.xpViewerCanvas, 300); 38 | I.waitForElement(viewerModelSelector, 300); 39 | }); 40 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/parameters_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-unused-vars */ 20 | /* eslint-disable no-undef */ 21 | const locators = require('./elements_definition.js'); 22 | 23 | Feature('Parameters panel'); 24 | 25 | Before(({ I }) => { 26 | I.amOnPage('/'); 27 | }); 28 | 29 | Scenario('should check if Parameter panel has Reset and Update button', async ({ I }) => { 30 | 31 | // click on Model tab 32 | I.clickToModelTab(); 33 | 34 | // check that Model tab has correct content 35 | I.see("Reset", locators.xpButtonReset ); 36 | I.see("Update", locators.xpButtonUpdate ); 37 | }); 38 | 39 | //ensure that Stripe panel is not disabled!!! 40 | Scenario('should check if Stripe panel is displayed and hidden', async ({ I }) => { 41 | 42 | I.selectProject('Wrench'); 43 | 44 | // Set the model parameter to see strip 45 | I.setParamValue("Jaw Offset", "11 mm"); 46 | 47 | // check if the Stripe element is displayed 48 | I.seeElement(locators.xpStripeElement); 49 | 50 | // Set the model parameter back to original value 51 | I.setParamValue("Jaw Offset", "10 mm"); 52 | 53 | // check if the Stripe element was hidden 54 | I.waitForInvisible(locators.xpStripeElement, 5); 55 | }); 56 | 57 | 58 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/update_params_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-undef */ 20 | const locators = require('./elements_definition.js'); 21 | const assert = require('assert'); 22 | const newParamValue = '24 mm'; 23 | const paramName = 'Jaw Offset'; 24 | 25 | Feature('Update params'); 26 | 27 | Before(({ I }) => { 28 | I.amOnPage('/'); 29 | }); 30 | 31 | Scenario('Updating parameters for model', async ({ I }) => { 32 | 33 | I.selectProject("Wrench"); 34 | 35 | // enter new parameter value 36 | I.setParamValue(paramName, newParamValue); 37 | 38 | // check that stripe appeared 39 | I.waitForVisible(locators.xpStripeElement, 10); 40 | 41 | // Click on Update button 42 | I.updateProject(); 43 | 44 | // check that stripe disappeared 45 | I.waitForInvisible(locators.xpStripeElement, 5); 46 | 47 | // check for updated parameter value 48 | const jawOffsetInput = '//div[text() = "'+ paramName +'"]//input'; 49 | I.waitForVisible(jawOffsetInput, 20); 50 | const currentParamValue = await I.grabValueFrom(jawOffsetInput); 51 | assert.strictEqual(newParamValue, currentParamValue, 'Error: Parameter "' + paramName + '" has incorrect value!'); 52 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/upload_IPT_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-console */ 20 | /* eslint-disable no-undef */ 21 | 22 | Feature('Upload and delete IPT design'); 23 | 24 | Before(async ({ I }) => { 25 | I.amOnPage('/'); 26 | await I.signIn(); 27 | }); 28 | 29 | Scenario('upload IPT design workflow', ({ I }) => { 30 | I.uploadIPTFile('src/ui-tests/dataset/EndCap.ipt'); 31 | }); 32 | 33 | Scenario('delete IPT design workflow', ({ I }) => { 34 | I.deleteProject('EndCap'); 35 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/upload_delete_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-console */ 20 | /* eslint-disable no-undef */ 21 | 22 | Feature('Upload and delete'); 23 | 24 | Before(async ({ I }) => { 25 | I.amOnPage('/'); 26 | await I.signIn(); 27 | }); 28 | 29 | Scenario('upload workflow', ({ I }) => { 30 | I.uploadProject('src/ui-tests/dataset/SimpleBox.zip', 'SimpleBox.iam'); 31 | }); 32 | 33 | Scenario('delete workflow', ({ I }) => { 34 | I.deleteProject('SimpleBox'); 35 | }); 36 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/upload_fail_log_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-undef */ 20 | 21 | Feature('Failed Upload Dialog'); 22 | 23 | Before(async ({ I }) => { 24 | I.amOnPage('/'); 25 | await I.signIn(); 26 | }); 27 | 28 | Scenario('upload IPT and verify that exists report.txt url', ({ I }) => { 29 | 30 | I.uploadInvalidIPTFile('src/ui-tests/dataset/invalid.ipt'); 31 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/user_details_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-undef */ 20 | Feature('User Details Control'); 21 | 22 | Before(({ I }) => { 23 | I.amOnPage('/'); 24 | }); 25 | 26 | Scenario('should check if user details control has the expected items', ({ I }) => { 27 | I.see("USER", locate('div').find('span.user')); 28 | I.see("A", locate('div').find('span.avatar-custom-style')); 29 | I.see("Anonymous", locate('div').find('span.username')); 30 | I.see("Sign In", locate('div').find('button')); 31 | }); -------------------------------------------------------------------------------- /WebApplication/ClientApp/src/ui-tests/viewer_test.js: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | /* eslint-disable no-undef */ 20 | const locators = require('./elements_definition.js'); 21 | 22 | Feature('Viewer'); 23 | 24 | Before(({ I }) => { 25 | I.amOnPage('/'); 26 | }); 27 | 28 | Scenario('should check switch to model tab loads the viewer', ({ I }) => { 29 | 30 | const viewerModelSelector = '#ViewerModelStructurePanel'; 31 | 32 | I.see('Model', locators.modelTab); 33 | I.clickToModelTab(); 34 | I.waitForElement(locators.xpViewerCanvas, 10); 35 | I.waitForElement(viewerModelSelector, 10); 36 | }); 37 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/steps.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | type steps_file = typeof import('./steps_file.js'); 3 | 4 | declare namespace CodeceptJS { 5 | interface SupportObject { I: CodeceptJS.I } 6 | interface CallbackOrder { [0]: CodeceptJS.I } 7 | interface Methods extends CodeceptJS.Playwright {} 8 | interface I extends ReturnType {} 9 | namespace Translation { 10 | interface Actions {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WebApplication/ClientApp/teardown.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | module.exports = function() { 4 | console.log('Tear down'); 5 | 6 | process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; 7 | 8 | axios.get('https://localhost:5001/ClearSelf') 9 | .then(response => { 10 | console.log(response.data); 11 | }) 12 | .catch(error => { 13 | console.log(error); 14 | }); 15 | } -------------------------------------------------------------------------------- /WebApplication/Controllers/VersionController.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Reflection; 20 | using Microsoft.AspNetCore.Mvc; 21 | 22 | namespace WebApplication.Controllers 23 | { 24 | [Route("[controller]")] 25 | public class VersionController : ControllerBase 26 | { 27 | [HttpGet] 28 | public string Get() 29 | { 30 | return Assembly.GetEntryAssembly().GetCustomAttribute().InformationalVersion; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WebApplication/Definitions/AdoptProjectWithParametersPayload.cs: -------------------------------------------------------------------------------- 1 | using Shared; 2 | 3 | namespace WebApplication.Definitions 4 | { 5 | public class AdoptProjectWithParametersPayload : DefaultProjectConfiguration 6 | { 7 | public InventorParameters Config { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WebApplication/Definitions/FdaProcessingException.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System; 20 | 21 | namespace WebApplication.Definitions 22 | { 23 | /// 24 | /// Exception for FDA processing failures. 25 | /// Contains URL to processing report. 26 | /// 27 | public class FdaProcessingException : Exception 28 | { 29 | public string ReportUrl { get; } 30 | 31 | public FdaProcessingException(string message, string reportUrl) : base(message) 32 | { 33 | ReportUrl = reportUrl; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /WebApplication/Definitions/ProcessingException.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System; 20 | 21 | namespace WebApplication.Definitions 22 | { 23 | /// 24 | /// Exception to report about processing problems. 25 | /// Use it if you want to pass a message to the client to be shown in the UI. 26 | /// 27 | public class ProcessingException : Exception 28 | { 29 | public string Title { get; } 30 | public string[] Messages { get; } 31 | 32 | public ProcessingException(string title, string[] messages) 33 | { 34 | Title = title; 35 | Messages = messages; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /WebApplication/Definitions/ProcessingResult.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Collections.Generic; 20 | using Autodesk.Forge.DesignAutomation.Model; 21 | 22 | namespace WebApplication.Definitions 23 | { 24 | public class ProcessingResult 25 | { 26 | public bool Success { get; set; } 27 | public string ReportUrl { get; set; } 28 | public string ErrorMessage { get; set; } 29 | 30 | public List Stats { get; set; } = new List(); 31 | 32 | public ProcessingResult(Statistics statistics) 33 | { 34 | Stats.Add(statistics); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WebApplication/Definitions/ProfileDTO.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | namespace WebApplication.Definitions 20 | { 21 | public class ProfileDTO 22 | { 23 | public string Name { get; set; } 24 | public string AvatarUrl { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WebApplication/Definitions/ProjectDTO.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System; 20 | using Shared; 21 | 22 | namespace WebApplication.Definitions 23 | { 24 | public class ProjectDTO : ProjectDTOBase 25 | { 26 | public string Id { get; set; } 27 | public string Label { get; set; } 28 | 29 | /// 30 | /// Thumbnail URL. 31 | /// 32 | public string Image { get; set; } 33 | 34 | /// 35 | /// If project is assembly. 36 | /// 37 | public bool IsAssembly { get; set; } 38 | 39 | /// 40 | /// If project has drawings 41 | /// 42 | [Obsolete] 43 | public bool HasDrawing { get; set; } 44 | 45 | /// 46 | /// URL to DrawingsList JSON. 47 | /// 48 | public string DrawingsListUrl { get; set; } 49 | 50 | /// 51 | /// Adoption messages. 52 | /// 53 | public string[] AdoptWarnings { get; set; } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /WebApplication/Definitions/ProjectDTOBase.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | namespace WebApplication.Definitions 20 | { 21 | /// 22 | /// Common pieces for project-related DTOs 23 | /// 24 | public class ProjectDTOBase 25 | { 26 | /// 27 | /// URL to SVF directory. 28 | /// 29 | public string Svf { get; set; } 30 | 31 | /// 32 | /// URL to BOM JSON. 33 | /// 34 | public string BomJsonUrl { get; set; } 35 | 36 | /// 37 | /// URL to download BOM CSV. 38 | /// 39 | public string BomDownloadUrl { get; set; } 40 | 41 | /// 42 | /// URL to download current model 43 | /// 44 | public string ModelDownloadUrl { get; set; } 45 | 46 | /// 47 | /// Parameters hash 48 | /// 49 | public string Hash { get; set; } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /WebApplication/Definitions/ProjectInfo.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | namespace WebApplication.Definitions 20 | { 21 | public class ProjectInfo 22 | { 23 | public string Name { get; set; } 24 | public string TopLevelAssembly { get; set; } 25 | 26 | public ProjectInfo(string NameParam = null, string TopLevelAssemblyParam = null) 27 | { 28 | Name = NameParam; 29 | TopLevelAssembly = TopLevelAssemblyParam; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /WebApplication/Definitions/ProjectMetadata.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Text.Json.Serialization; 20 | 21 | namespace WebApplication.Definitions 22 | { 23 | public class ProjectMetadata 24 | { 25 | /// 26 | /// Hash string for parameters. 27 | /// 28 | [JsonPropertyName("hash")] 29 | public string Hash { get; set; } 30 | 31 | /// 32 | /// Pathname of the top-level assembly. 33 | /// 34 | [JsonPropertyName("tla")] 35 | public string TLA { get; set; } 36 | 37 | public bool IsAssembly => !string.IsNullOrEmpty(TLA); 38 | 39 | [JsonPropertyName("hasDrawings")] 40 | public bool HasDrawings { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /WebApplication/Definitions/ProjectStateDTO.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Text.Json.Serialization; 20 | using Shared; 21 | 22 | namespace WebApplication.Definitions 23 | { 24 | public class ProjectStateDTO : ProjectDTOBase 25 | { 26 | /// 27 | /// Parameters. 28 | /// 29 | [JsonPropertyName("parameters")] 30 | public InventorParameters Parameters { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /WebApplication/Definitions/PublisherConfiguration.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | namespace WebApplication.Definitions 20 | { 21 | public enum CompletionCheck 22 | { 23 | /// 24 | /// Use polling (ask about status periodically). 25 | /// 26 | Polling, 27 | 28 | /// 29 | /// Use callback URL to get notification from FDA servers. 30 | /// 31 | Callback 32 | } 33 | 34 | public class PublisherConfiguration 35 | { 36 | /// 37 | /// How publisher should check for completion. 38 | /// 39 | public CompletionCheck CompletionCheck { get; set; } = CompletionCheck.Polling; 40 | 41 | private string callbackUrlBase; 42 | 43 | /// 44 | /// Base URL for callback. 45 | /// 46 | public string CallbackUrlBase 47 | { 48 | get 49 | { 50 | return callbackUrlBase + "/"; 51 | } 52 | set 53 | { 54 | callbackUrlBase = value; 55 | } 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /WebApplication/Job/IResultSender.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Threading.Tasks; 20 | 21 | namespace WebApplication.Job 22 | { 23 | /// 24 | /// Interface to send results back. 25 | /// 26 | public interface IResultSender 27 | { 28 | Task SendSuccessAsync(); 29 | Task SendSuccessAsync(object arg0); 30 | Task SendSuccessAsync(object arg0, object arg1); 31 | Task SendSuccessAsync(object arg0, object arg1, object arg2); 32 | 33 | /// 34 | /// Send information about failed processing. 35 | /// 36 | /// ID of the job. // TODO: is it useful? 37 | /// Error details 38 | Task SendErrorAsync(ProcessingError error); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebApplication/Job/JobItemBase.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using Microsoft.Extensions.Logging; 20 | using System; 21 | using System.Threading.Tasks; 22 | using WebApplication.Processing; 23 | 24 | namespace WebApplication.Job 25 | { 26 | public abstract class JobItemBase 27 | { 28 | protected ILogger Logger { get; } 29 | protected ProjectWork ProjectWork { get; } 30 | public string ProjectId { get; } 31 | public string Id { get; } 32 | 33 | protected JobItemBase(ILogger logger, string projectId, ProjectWork projectWork) 34 | { 35 | ProjectId = projectId; 36 | Id = Guid.NewGuid().ToString(); 37 | ProjectWork = projectWork; 38 | Logger = logger; 39 | } 40 | 41 | public abstract Task ProcessJobAsync(IResultSender resultSender); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /WebApplication/Job/UpdateModelJobItem.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using Microsoft.Extensions.Logging; 20 | using System.Threading.Tasks; 21 | using Shared; 22 | using WebApplication.Definitions; 23 | using WebApplication.Processing; 24 | 25 | namespace WebApplication.Job 26 | { 27 | public class UpdateModelJobItem : JobItemBase 28 | { 29 | public InventorParameters Parameters { get; } 30 | 31 | public UpdateModelJobItem(ILogger logger, string projectId, InventorParameters parameters, ProjectWork projectWork) 32 | : base(logger, projectId, projectWork) 33 | { 34 | Parameters = parameters; 35 | } 36 | 37 | public override async Task ProcessJobAsync(IResultSender resultSender) 38 | { 39 | using var scope = Logger.BeginScope("Update Model ({Id})"); 40 | 41 | Logger.LogInformation($"ProcessJob (Update) {Id} for project {ProjectId} started."); 42 | 43 | (ProjectStateDTO state, FdaStatsDTO stats, string reportUrl) = await ProjectWork.DoSmartUpdateAsync(Parameters, ProjectId); 44 | 45 | Logger.LogInformation($"ProcessJob (Update) {Id} for project {ProjectId} completed."); 46 | 47 | // send that we are done to client 48 | await resultSender.SendSuccessAsync(state, stats, reportUrl); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /WebApplication/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /WebApplication/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Microsoft.AspNetCore.Mvc.RazorPages; 4 | using Microsoft.Extensions.Logging; 5 | 6 | namespace WebApplication.Pages 7 | { 8 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 9 | public class ErrorModel : PageModel 10 | { 11 | private readonly ILogger _logger; 12 | 13 | public ErrorModel(ILogger logger) 14 | { 15 | _logger = logger; 16 | } 17 | 18 | public string RequestId { get; set; } 19 | 20 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WebApplication/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @namespace WebApplication.Pages 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /WebApplication/Processing/CreateBOM.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Collections.Generic; 20 | using WebApplication.Definitions; 21 | 22 | namespace WebApplication.Processing 23 | { 24 | public class CreateBOM : ForgeAppBase 25 | { 26 | public override string Id => nameof(CreateBOM); 27 | public override string Description => "Generate BOM for Inventor document"; 28 | 29 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.BomUrl; 30 | protected override string OutputName => "bom.json"; 31 | 32 | public CreateBOM(Publisher publisher) : base(publisher) {} 33 | 34 | public override List ActivityCommandLine => 35 | new List 36 | { 37 | $"$(engine.path)\\InventorCoreConsole.exe /al \"$(appbundles[{ActivityId}].path)\" /i \"$(args[{InputDocParameterName}].path)\"" 38 | }; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebApplication/Processing/CreateRFA.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using Autodesk.Forge.DesignAutomation.Model; 20 | using System.Collections.Generic; 21 | using WebApplication.Definitions; 22 | 23 | namespace WebApplication.Processing 24 | { 25 | /// 26 | /// RFA generator from Inventor document. 27 | /// 28 | public class CreateRFA : ForgeAppBase 29 | { 30 | public override string Id => nameof(CreateRFA); 31 | public override string Description => "Generate RFA from Inventor document"; 32 | 33 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.RfaUrl; 34 | protected override string OutputName => "Output.rfa"; 35 | 36 | protected internal override ForgeRegistration Registration { get; } = ForgeRegistration.All; 37 | 38 | /// 39 | /// Constructor. 40 | /// 41 | public CreateRFA(Publisher publisher) : base(publisher) {} 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /WebApplication/Processing/CreateSAT.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using WebApplication.Definitions; 20 | 21 | namespace WebApplication.Processing 22 | { 23 | /// 24 | /// SAT generator from Inventor document. 25 | /// 26 | public class CreateSAT : ForgeAppBase 27 | { 28 | public override string Id => nameof(CreateSAT); 29 | public override string Description => "Generate SAT from Inventor document"; 30 | 31 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.SatUrl; 32 | protected override string OutputName => "export.sat"; 33 | 34 | protected internal override ForgeRegistration Registration { get; } = ForgeRegistration.All; 35 | 36 | /// 37 | /// Constructor. 38 | /// 39 | public CreateSAT(Publisher publisher) : base(publisher) {} 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /WebApplication/Processing/CreateSVF.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using WebApplication.Definitions; 20 | 21 | namespace WebApplication.Processing 22 | { 23 | /// 24 | /// SVF generator from Inventor document. 25 | /// 26 | public class CreateSVF : ForgeAppBase 27 | { 28 | public override string Id => nameof(CreateSVF); 29 | public override string Description => "Generate SVF from Inventor document"; 30 | 31 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.SvfUrl; 32 | protected override string OutputName => "SvfOutput"; 33 | protected override bool IsOutputZip => true; 34 | 35 | /// 36 | /// Constructor. 37 | /// 38 | public CreateSVF(Publisher publisher) : base(publisher) {} 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebApplication/Processing/CreateThumbnail.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using WebApplication.Definitions; 20 | 21 | namespace WebApplication.Processing 22 | { 23 | /// 24 | /// Generate PNG thumbnail for Inventor document. 25 | /// 26 | public class CreateThumbnail : ForgeAppBase 27 | { 28 | public override string Id => nameof(CreateThumbnail); 29 | public override string Description => "Generate thumbnail from Inventor document"; 30 | 31 | protected override string OutputUrl(ProcessingArgs projectData) 32 | { 33 | return (projectData as AdoptionData).ThumbnailUrl; // TODO: use generics 34 | } 35 | 36 | protected override string OutputName => "thumbnail.png"; 37 | 38 | /// 39 | /// Constructor. 40 | /// 41 | public CreateThumbnail(Publisher publisher) : base(publisher) { } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /WebApplication/Processing/ExtractParameters.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using WebApplication.Definitions; 20 | 21 | namespace WebApplication.Processing 22 | { 23 | /// 24 | /// Extract parameters from Inventor document and save the current model state. 25 | /// 26 | public class ExtractParameters : ForgeAppBase 27 | { 28 | public override string Id => nameof(ExtractParameters); 29 | public override string Description => "Extract Parameters and Save Inventor document"; 30 | 31 | protected override string OutputName => "documentParams.json"; 32 | protected override string OutputUrl(ProcessingArgs projectData) => projectData.ParametersJsonUrl; 33 | 34 | /// 35 | /// Constructor. 36 | /// 37 | public ExtractParameters(Publisher publisher) : base(publisher) { } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /WebApplication/Processing/UpdateProject.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | namespace WebApplication.Processing 20 | { 21 | /// 22 | /// Update project: 23 | /// - generate SVF 24 | /// - extract parameters and BOM 25 | /// - save current model 26 | /// 27 | public class UpdateProject : AggregatedDefinition 28 | { 29 | public UpdateProject(Publisher publisher) : 30 | base(publisher, 31 | new UpdateParameters(publisher), 32 | new CreateSVF(publisher), 33 | new CreateBOM(publisher)) 34 | { 35 | } 36 | 37 | public override string Id => nameof(UpdateProject); 38 | public override string Description => "Update parameters"; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebApplication/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:33408", 7 | "sslPort": 44351 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "aps-configurator-inventor": { 19 | "commandName": "Project", 20 | "commandLineArgs": "poc=true", 21 | "launchBrowser": true, 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | }, 25 | "applicationUrl": "https://localhost:5001" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /WebApplication/Services/AdoptProjectWithParametersPayloadProvider.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Net.Http; 3 | using System.Text.Json; 4 | using System.Threading.Tasks; 5 | using Microsoft.Extensions.Logging; 6 | using WebApplication.Definitions; 7 | 8 | namespace WebApplication.Services 9 | { 10 | public class AdoptProjectWithParametersPayloadProvider 11 | { 12 | private readonly ILogger _logger; 13 | private readonly IHttpClientFactory _clientFactory; 14 | 15 | public AdoptProjectWithParametersPayloadProvider(ILogger logger, IHttpClientFactory clientFactory) 16 | { 17 | _logger = logger; 18 | _clientFactory = clientFactory; 19 | } 20 | 21 | public async Task GetParametersAsync(string jsonFileUrl) 22 | { 23 | _logger.LogInformation($"downloading parameters from {jsonFileUrl}"); 24 | 25 | var httpClient = _clientFactory.CreateClient(); 26 | await using var httpStream = await httpClient.GetStreamAsync(jsonFileUrl); 27 | 28 | StreamReader reader = new StreamReader(httpStream); 29 | var jsonAsString = await reader.ReadToEndAsync(); 30 | 31 | _logger.LogDebug($"parsing parameters from {jsonAsString}"); 32 | 33 | return JsonSerializer.Deserialize(jsonAsString); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /WebApplication/Services/BucketPrefixProvider.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Forge.Core; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.Options; 4 | 5 | namespace WebApplication.Services 6 | { 7 | public class BucketPrefixProvider 8 | { 9 | private readonly ForgeConfiguration _forgeConfig; 10 | private readonly IConfiguration _configuration; 11 | 12 | public BucketPrefixProvider(IOptions forgeConfiguration, IConfiguration configuration) 13 | { 14 | _configuration = configuration; 15 | _forgeConfig = forgeConfiguration.Value; 16 | } 17 | 18 | public string GetBucketPrefix(string suffixParam = null) 19 | { 20 | string suffix = suffixParam ?? _configuration?.GetValue("BucketKeySuffix"); 21 | return $"authd{suffix}-{_forgeConfig.ClientId}".ToLowerInvariant(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WebApplication/Services/Exceptions/ProjectAlreadyExistsException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebApplication.Services.Exceptions 4 | { 5 | public class ProjectAlreadyExistsException : Exception 6 | { 7 | private readonly string _projectName; 8 | 9 | public ProjectAlreadyExistsException(string projectName) : base($"Project with name {projectName} already exists") 10 | { 11 | _projectName = projectName; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WebApplication/Services/IBucketKeyProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace WebApplication.Services 4 | { 5 | public interface IBucketKeyProvider 6 | { 7 | string AnonymousBucketKey {get;} 8 | Task GetBucketKeyAsync(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WebApplication/Services/LoggedInUserBucketKeyProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Autodesk.Forge.Core; 4 | using Microsoft.Extensions.Configuration; 5 | using Microsoft.Extensions.Options; 6 | using WebApplication.State; 7 | using WebApplication.Utilities; 8 | 9 | namespace WebApplication.Services 10 | { 11 | public class LoggedInUserBucketKeyProvider : IBucketKeyProvider 12 | { 13 | private readonly ProfileProvider _profileProvider; 14 | private readonly IResourceProvider _resourceProvider; 15 | public string AnonymousBucketKey {get;} 16 | 17 | public LoggedInUserBucketKeyProvider(ProfileProvider profileProvider, IResourceProvider resourceProvider) 18 | { 19 | _profileProvider = profileProvider; 20 | _resourceProvider = resourceProvider; 21 | 22 | AnonymousBucketKey = resourceProvider.BucketKey; 23 | } 24 | 25 | public async Task GetBucketKeyAsync() 26 | { 27 | if (!_profileProvider.IsAuthenticated) return AnonymousBucketKey; 28 | 29 | dynamic profile = await _profileProvider.GetProfileAsync(); 30 | var userId = profile.userId; 31 | 32 | return _resourceProvider.LoggedUserBucketKey(userId); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /WebApplication/Services/MigrationBucketKeyProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using WebApplication.Utilities; 4 | 5 | namespace WebApplication.Services 6 | { 7 | public class MigrationBucketKeyProvider : IBucketKeyProvider 8 | { 9 | private readonly BucketPrefixProvider _bucketPrefixProvider; 10 | private readonly IResourceProvider _resourceProvider; 11 | private string BucketKey = ""; 12 | public string AnonymousBucketKey {get;} 13 | 14 | public MigrationBucketKeyProvider(BucketPrefixProvider bucketPrefixProvider, IResourceProvider resourceProvider) 15 | { 16 | _bucketPrefixProvider = bucketPrefixProvider; 17 | _resourceProvider = resourceProvider; 18 | AnonymousBucketKey = resourceProvider.BucketKey; 19 | } 20 | 21 | public Task GetBucketKeyAsync() 22 | { 23 | return Task.FromResult(BucketKey); 24 | } 25 | public string SetBucketKeyFromOld(string bucketKeyOld) 26 | { 27 | BucketKey = GetBucketKeyFromOld(bucketKeyOld); 28 | 29 | return BucketKey; 30 | } 31 | 32 | public string GetBucketKeyFromOld(string bucketKeyOld) 33 | { 34 | string bucketKeyNew; 35 | string [] splittedBucketKeyOld = bucketKeyOld.Split('-'); 36 | 37 | if (splittedBucketKeyOld[0] == ResourceProvider.projectsTag) 38 | { 39 | // anonymous bucket key 40 | bucketKeyNew = AnonymousBucketKey; 41 | } 42 | else 43 | { 44 | // logged user bucket key 45 | string userId = splittedBucketKeyOld[2]; 46 | string userHash = splittedBucketKeyOld[3]; 47 | bucketKeyNew = _resourceProvider.LoggedUserBucketKey(userId, userHash); 48 | } 49 | 50 | return bucketKeyNew; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /WebApplication/Services/ProfileProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace WebApplication.Services 5 | { 6 | public class ProfileProvider 7 | { 8 | private readonly TokenService _tokenService; 9 | private readonly Lazy> _lazyProfile; 10 | public Task Token => _tokenService.GetToken(Code, VerifierId); 11 | public string Code { private get; set; } 12 | public string VerifierId { private get; set; } 13 | 14 | public ProfileProvider(IForgeOSS forgeOss, TokenService tokenService) 15 | { 16 | _lazyProfile = new Lazy>(async () => await forgeOss.GetProfileAsync(await Token)); 17 | _tokenService = tokenService; 18 | } 19 | 20 | public bool IsAuthenticated => !string.IsNullOrEmpty(Code); 21 | 22 | public Task GetProfileAsync() => _lazyProfile.Value; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WebApplication/State/NewProjectModel.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using Microsoft.AspNetCore.Http; 20 | 21 | namespace WebApplication.State 22 | { 23 | public class NewProjectModel 24 | { 25 | public string root {get; set;} 26 | public IFormFile package { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WebApplication/State/Uploads.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Collections.Generic; 20 | using WebApplication.Definitions; 21 | 22 | namespace WebApplication.State 23 | { 24 | public class Uploads 25 | { 26 | private readonly Dictionary _uploadFilenames; 27 | private readonly Dictionary _uploadProjects; 28 | 29 | public Uploads() 30 | { 31 | _uploadFilenames = new Dictionary(); 32 | _uploadProjects = new Dictionary(); 33 | } 34 | 35 | public void AddUploadData(string uploadId, ProjectInfo projectInfo, string filename) 36 | { 37 | _uploadFilenames.Add(uploadId, filename); 38 | _uploadProjects.Add(uploadId, projectInfo); 39 | } 40 | 41 | public (ProjectInfo projectInfo, string filename) GetUploadData(string uploadId) 42 | { 43 | return (projectInfo: _uploadProjects[uploadId], filename: _uploadFilenames[uploadId]); 44 | } 45 | 46 | public void ClearUploadData(string uploadId) 47 | { 48 | _uploadFilenames.Remove(uploadId); 49 | _uploadProjects.Remove(uploadId); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /WebApplication/Utilities/Collections.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Collections.Generic; 20 | 21 | namespace WebApplication.Utilities 22 | { 23 | public class Collections 24 | { 25 | /// 26 | /// Merge dictionaries into a single one. 27 | /// 28 | /// NOTE: in case of several key-value pairs - the last value will "survive". 29 | /// 30 | public static Dictionary MergeDictionaries(IEnumerable> dictionaries) 31 | { 32 | var output = new Dictionary(); 33 | 34 | foreach (var dict in dictionaries) 35 | { 36 | foreach (var (key, value) in dict) 37 | { 38 | // to avoid exception on collision 39 | output[key] = value; 40 | } 41 | } 42 | 43 | return output; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /WebApplication/Utilities/ExtractedBomEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Text; 4 | using Shared; 5 | 6 | namespace WebApplication.Utilities 7 | { 8 | public static class ExtractedBomEx 9 | { 10 | /// 11 | /// Convert BOM to CSV representation. 12 | /// 13 | /// CSV string. 14 | public static string ToCSV(this ExtractedBOM bom) 15 | { 16 | if (! bom.HasColumns()) throw new ApplicationException("Invalid BOM: header is expected."); 17 | 18 | var columnsLength = bom.Columns.Length; 19 | 20 | var builder = new StringBuilder(32 * 1024); 21 | builder.AppendJoin(",", bom.Columns.Select(column => Encode(column.Label))); 22 | builder.AppendLine(); 23 | 24 | for (var i = 0; i < bom.Data?.Length; i++) 25 | { 26 | object[] row = bom.Data[i]; 27 | if (row.Length != columnsLength) 28 | throw new ApplicationException( 29 | $"Invalid BOM: row {i} has different number of columns than header."); 30 | 31 | builder.AppendJoin(",", row.Select(value => Encode(value.ToString()))); 32 | builder.AppendLine(); 33 | } 34 | 35 | return builder.ToString(); 36 | } 37 | 38 | public static bool HasColumns(this ExtractedBOM bom) 39 | { 40 | return bom.Columns?.Length > 0; 41 | } 42 | 43 | public static bool HasData(this ExtractedBOM bom) 44 | { 45 | return bom.Data?.Length > 0 && bom.Data?[0].Length > 0; 46 | } 47 | 48 | private static string Encode(string value) 49 | { 50 | // - Fields with embedded commas or double-quote characters must be quoted 51 | if (value.Contains(",")) 52 | { 53 | return "\"" + 54 | // - Each of the embedded double-quote characters must be represented by a pair of double-quote characters 55 | value.Replace("\"", "\"\"") + 56 | "\""; 57 | } 58 | else 59 | { 60 | return value; 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /WebApplication/Utilities/FileSystem.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.IO; 20 | 21 | namespace WebApplication.Utilities 22 | { 23 | /// 24 | /// Utilities for files/directories work. 25 | /// 26 | public static class FileSystem 27 | { 28 | /// 29 | /// Copy directory. 30 | /// 31 | public static void CopyDir(string dirFrom, string dirTo) 32 | { 33 | // based on https://stackoverflow.com/a/8022011 34 | var dirFromLength = dirFrom.Length + 1; 35 | 36 | foreach (string dir in Directory.GetDirectories(dirFrom, "*", SearchOption.AllDirectories)) 37 | { 38 | Directory.CreateDirectory(Path.Combine(dirTo, dir.Substring(dirFromLength))); 39 | } 40 | 41 | foreach (string fileName in Directory.GetFiles(dirFrom, "*", SearchOption.AllDirectories)) 42 | { 43 | File.Copy(fileName, Path.Combine(dirTo, fileName.Substring(dirFromLength))); 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /WebApplication/Utilities/GuidGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebApplication.Utilities 4 | { 5 | public interface IGuidGenerator 6 | { 7 | string GenerateGuid(); 8 | } 9 | 10 | public class GuidGenerator : IGuidGenerator 11 | { 12 | public string GenerateGuid() 13 | { 14 | return Guid.NewGuid().ToString("N"); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /WebApplication/Utilities/ITaskUtil.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace WebApplication.Utilities 4 | { 5 | public interface ITaskUtil 6 | { 7 | Task Sleep(int millis); 8 | } 9 | 10 | public class TaskUtil : ITaskUtil 11 | { 12 | public async Task Sleep(int millis) 13 | { 14 | await Task.Delay(millis); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /WebApplication/Utilities/InviteOnlyChecker.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.Linq; 20 | using System.Net.Mail; 21 | using WebApplication.Definitions; 22 | 23 | public class InviteOnlyChecker 24 | { 25 | private readonly InviteOnlyModeConfiguration _inviteOnlyModeConfig; 26 | 27 | public InviteOnlyChecker(InviteOnlyModeConfiguration inviteOnlyModeConfig) 28 | { 29 | _inviteOnlyModeConfig = inviteOnlyModeConfig; 30 | } 31 | 32 | public bool IsInvited(string email) 33 | { 34 | if (_inviteOnlyModeConfig.Enabled) 35 | { 36 | bool isInDomains = false; 37 | if (_inviteOnlyModeConfig.Domains?.Length > 0) 38 | { 39 | MailAddress address = new MailAddress(email); // email comes from autodesk auth service so it should be in a valid format 40 | string host = address.Host; 41 | isInDomains = _inviteOnlyModeConfig.Domains.Contains(host); 42 | } 43 | 44 | bool isInAddresses = false; 45 | if (_inviteOnlyModeConfig.Addresses?.Length > 0) 46 | { 47 | isInAddresses = _inviteOnlyModeConfig.Addresses.Contains(email); 48 | } 49 | 50 | return isInDomains || isInAddresses; 51 | } 52 | 53 | return true; 54 | } 55 | } -------------------------------------------------------------------------------- /WebApplication/Utilities/TempFile.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System; 20 | using System.IO; 21 | 22 | namespace WebApplication.Utilities 23 | { 24 | /// 25 | /// Wrapper for temporary file, which is deleted on disposal. 26 | /// 27 | public class TempFile : IDisposable 28 | { 29 | /// 30 | /// Full filename of uniquely named, zero-byte temporary file on disk. 31 | /// 32 | public string Name { get; } 33 | 34 | public TempFile() 35 | { 36 | Name = Path.GetTempFileName(); 37 | } 38 | 39 | public void Dispose() 40 | { 41 | File.Delete(Name); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /WebApplication/Utilities/Web.cs: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////// 2 | // Copyright (c) Autodesk, Inc. All rights reserved 3 | // Written by Autodesk Design Automation team for Inventor 4 | // 5 | // Permission to use, copy, modify, and distribute this software in 6 | // object code form for any purpose and without fee is hereby granted, 7 | // provided that the above copyright notice appears in all copies and 8 | // that both that copyright notice and the limited warranty and 9 | // restricted rights notice below appear in all supporting 10 | // documentation. 11 | // 12 | // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 13 | // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF 14 | // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. 15 | // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE 16 | // UNINTERRUPTED OR ERROR FREE. 17 | ///////////////////////////////////////////////////////////////////// 18 | 19 | using System.IO; 20 | using System.Net.Http; 21 | using System.Threading.Tasks; 22 | 23 | namespace WebApplication.Utilities 24 | { 25 | /// 26 | /// Web-related utilities. 27 | /// 28 | public static class Web 29 | { 30 | /// 31 | /// Download URL to the local file. 32 | /// 33 | public static async Task DownloadAsync(this HttpClient httpClient, string url, string localFile) 34 | { 35 | await using var httpStream = await httpClient.GetStreamAsync(url); 36 | await using var localStream = File.Create(localFile); 37 | await httpStream.CopyToAsync(localStream); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebApplication/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Processing": { 3 | "SaveReport": "All" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /WebApplication/appsettings.Local.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Forge": { 3 | "clientId": "", 4 | "clientSecret": "", 5 | "AuthenticationAddress": "https://developer.api.autodesk.com/authentication/v2/token", 6 | "DesignAutomation": { 7 | "BaseAddress": "https://developer.api.autodesk.com/da/us-east/" 8 | } 9 | }, 10 | "embedded" : true 11 | } -------------------------------------------------------------------------------- /WebApplication/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "AppBundleZipPaths": { 11 | "EmptyExe": "AppBundles/EmptyExePlugin.bundle.zip", 12 | "DataChecker": "AppBundles/DataCheckerPlugin.bundle.zip", 13 | "CreateSVF": "AppBundles/CreateSVFPlugin.bundle.zip", 14 | "CreateRFA": "AppBundles/RFAExportRCEPlugin.bundle.zip", 15 | "CreateBOM": "AppBundles/ExportBOMPlugin.bundle.zip", 16 | "CreateThumbnail": "AppBundles/CreateThumbnailPlugin.bundle.zip", 17 | "ExtractParameters": "AppBundles/ExtractParametersPlugin.bundle.zip", 18 | "UpdateParameters": "AppBundles/UpdateParametersPlugin.bundle.zip", 19 | "UpdateDrawings": "AppBundles/UpdateDrawingsPlugin.bundle.zip", 20 | "ExportDrawing": "AppBundles/ExportDrawingAsPdfPlugin.bundle.zip" 21 | }, 22 | "DefaultProjects": { 23 | "Projects": [ 24 | { 25 | "Url": "https://sdra-default-projects.s3.us-west-2.amazonaws.com/WrenchForm_2023.zip", 26 | "TopLevelAssembly": "Wrench.iam", 27 | "Name": "Wrench" 28 | }, 29 | { 30 | "Url": "https://sdra-default-projects.s3.us-west-2.amazonaws.com/Wheel_multi_IDW_2023.zip", 31 | "TopLevelAssembly": "WheelAssembly.iam", 32 | "Name": "Wheel" 33 | } 34 | ] 35 | }, 36 | "InviteOnlyMode": { 37 | "Enabled": false, 38 | "Domains": [ "autodesk.com" ], 39 | "Addresses": [ "adsk.demo.tool@gmail.com", "adsk.demo.tool+0@gmail.com" ] 40 | }, 41 | "Processing": { 42 | "SaveReport": "ErrorsOnly" 43 | }, 44 | "Serilog": { 45 | "MinimumLevel": { 46 | "Default": "Information", 47 | "Override": { 48 | "System": "Warning", 49 | "Microsoft.AspNetCore": "Warning", 50 | "Microsoft.Hosting.Lifetime": "Information" 51 | } 52 | } 53 | }, 54 | "Publisher": { 55 | "CompletionCheck": "Polling", 56 | "CallbackUrlBase": "https://url-of-your-deployed-server-in-case-your-Publisher-CompletionCheck-is-Callback/complete/" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /about.md: -------------------------------------------------------------------------------- 1 | # Autodesk Configuration with Design Automation for Inventor 2 | Using the Autodesk Configuration with Design Automation for Inventor web application one can easily manage and edit Inventor projects using only a web browser and an internet connection. The following operations are available: 3 | - manage custom Inventor projects (list, upload, delete) 4 | - interactively display the model 5 | - change editable parameters and update the model 6 | - list bill of materials 7 | - generate model drawing 8 | - download individual Inventor project assemblies (.IAM), Revit 3D model (.RFA), bill of material (.CSV) and model drawing (.PDF) 9 | 10 | The application is available using this link: https://inventor-config-demo.autodesk.io 11 | 12 | Non authenticated anonymous users can work with two predefined projects: Wheel and Wrench. 13 | 14 | The ability to upload custom projects is only for invited customers. Once you get the invitation, you need to authenticate using your Autodesk APS account. To sign up for the APS account, follow the instructions at https://aps.autodesk.com/. 15 | 16 | Every operation (i.e. model update after change of parameters, drawing creation) is computed in the cloud. For this purpose, Cloud Credits are required. Free Cloud Credits are provided to try APS after signing up. For more information about pricing, please see https://aps.autodesk.com/pricing. 17 | -------------------------------------------------------------------------------- /cicd/BuildMachine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 2 | 3 | SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] 4 | 5 | ADD InstallNode.ps1 . 6 | RUN ./InstallNode.ps1 7 | 8 | ENV NUGET_PACKAGES=c:\\sdra\\nuget 9 | 10 | ADD FontsToAdd.tar /Fonts/ 11 | 12 | WORKDIR /Fonts/ 13 | RUN ./Add-Font.ps1 Fonts 14 | 15 | WORKDIR / 16 | RUN Remove-Item Fonts -Recurse -------------------------------------------------------------------------------- /cicd/BuildMachine/FontsToAdd.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/cicd/BuildMachine/FontsToAdd.tar -------------------------------------------------------------------------------- /cicd/BuildMachine/InstallNode.ps1: -------------------------------------------------------------------------------- 1 | $nodeVer = "20.12.2" 2 | 3 | Invoke-WebRequest -OutFile nodejs.zip -UseBasicParsing "https://nodejs.org/dist/v${nodeVer}/node-v${nodeVer}-win-x64.zip" 4 | 5 | Expand-Archive nodejs.zip -DestinationPath C:\ 6 | 7 | Rename-Item "C:\\node-v${nodeVer}-win-x64" c:\nodejs 8 | 9 | [Environment]::SetEnvironmentVariable("Path", $env:Path + ";c:\nodejs", [EnvironmentVariableTarget]::Machine) -------------------------------------------------------------------------------- /cicd/BuildMachine/README.md: -------------------------------------------------------------------------------- 1 | # Windows build machine creation 2 | Those files were used to create Docker image for the Windows build machine. They need to be altered and re-used when there is a change in the build environment (like upgrade of .Net Framework or VisualStudio) 3 | 4 | Since UI tests run on this machine, we need working chromium to be installed and running there. The chromium installation is handled by npm module, but it does not run without several system fonts, which are not installed by default on windows server 2019. We need to install those fonts using dockerfile. Credists goes here https://github.com/prom3theu5/ServerCoreFonts 5 | 6 | Since the tight relation between the machine where is the image created and where it is used, it is recomended to run this on the EC2 macine (with the same version) if Windows which is used by CodeBuild. 7 | There might be a problem to log to Amazon ECR (docker registry) to push the resulting image. Following post helps with that: https://stackoverflow.com/questions/60807697/docker-login-error-storing-credentials-the-stub-received-bad-data -------------------------------------------------------------------------------- /cicd/Dockerfile.image: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 2 | COPY image/ app/ 3 | COPY cicd/commands.sh app/ 4 | 5 | WORKDIR /app 6 | 7 | RUN chmod +x commands.sh 8 | 9 | ENTRYPOINT ["./commands.sh"] -------------------------------------------------------------------------------- /cicd/appsettings.Local.json: -------------------------------------------------------------------------------- 1 | { 2 | "clientIdCanDeleteUserBuckets": "", 3 | "Forge": { 4 | "clientId": "", 5 | "clientSecret": "" 6 | }, 7 | "bucketKeySuffix" : "" 8 | } -------------------------------------------------------------------------------- /cicd/be-tests.ps1: -------------------------------------------------------------------------------- 1 | . ./cicd/common.ps1 2 | 3 | Write-Output "**** running backend tests ****" 4 | dotnet test 5 | CheckLastExitCode 6 | -------------------------------------------------------------------------------- /cicd/build.ps1: -------------------------------------------------------------------------------- 1 | . ./cicd/common.ps1 2 | 3 | Write-Output "**** Building ****" 4 | msbuild -restore /property:Configuration=Release 5 | CheckLastExitCode 6 | msbuild /property:Configuration=Release /Target:Publish 7 | CheckLastExitCode 8 | -------------------------------------------------------------------------------- /cicd/buildAndTest.ps1: -------------------------------------------------------------------------------- 1 | .\\build.ps1 2 | .\\be-tests.ps1 3 | .\\linter.ps1 4 | .\\fe-tests.ps1 5 | .\\ui-tests.ps1 -------------------------------------------------------------------------------- /cicd/commands.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | dotnet WebApplication.dll bundles=true -------------------------------------------------------------------------------- /cicd/common.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = "Stop" 2 | 3 | function CheckLastExitCode { 4 | param ([int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript=$null) 5 | 6 | if ($SuccessCodes -notcontains $LastExitCode) { 7 | if ($CleanupScript) { 8 | "Executing cleanup script: $CleanupScript" 9 | &$CleanupScript 10 | } 11 | $msg = @" 12 | EXE RETURNED EXIT CODE $LastExitCode 13 | CALLSTACK:$(Get-PSCallStack | Out-String) 14 | "@ 15 | throw $msg 16 | } 17 | } 18 | 19 | $env:STOP_AFTER_FAIL="true" 20 | $env:embedded="true" 21 | $env:NODE_ENV="development" 22 | $doteNetRelease = "net6.0" 23 | -------------------------------------------------------------------------------- /cicd/fe-tests.ps1: -------------------------------------------------------------------------------- 1 | . ./cicd/common.ps1 2 | 3 | Write-Output "**** running frontend tests ****" 4 | $slnDir=$PWD.ToString() 5 | Set-Location WebApplication/ClientApp 6 | npm test -- --coverage 7 | CheckLastExitCode 8 | Set-Location $slnDir -------------------------------------------------------------------------------- /cicd/linter.ps1: -------------------------------------------------------------------------------- 1 | . ./cicd/common.ps1 2 | 3 | Write-Output "**** running linter ****" 4 | $slnDir=$PWD.ToString() 5 | Set-Location WebApplication/ClientApp 6 | npm run lint 7 | CheckLastExitCode 8 | Set-Location $slnDir -------------------------------------------------------------------------------- /cicd/ui-tests.ps1: -------------------------------------------------------------------------------- 1 | . ./cicd/common.ps1 2 | 3 | xcopy /Y /E WebApplication\bin\Release\$doteNetRelease\publish\* output\uitest\ 4 | xcopy /Y /E WebApplication\AppBundles\* output\uitest\AppBundles\ 5 | 6 | $slnDir=$PWD.ToString() 7 | 8 | Write-Output "**** Starting the server ****" 9 | Set-Location output\uitest\ 10 | $serverProcess = Start-Process -NoNewWindow dotnet -ArgumentList "WebApplication.dll", "clear=true", "initialize=true", "allowCleanSelf=true" -PassThru 11 | Set-Location $slnDir\WebApplication 12 | Write-Output "Waiting for server to initialize" 13 | ..\cicd\waitForServer.ps1 14 | Write-Output "**** running the UI tests ****" 15 | Set-Location ClientApp 16 | mkdir output 17 | try { 18 | npx codeceptjs run $env:UITestParams 19 | CheckLastExitCode 20 | } 21 | finally { 22 | Write-Host "==== Post Build phase ====" 23 | Set-Location $slnDir 24 | xcopy /Y /E WebApplication\ClientApp\output\* output\report\errorScreenShots\ 25 | xcopy /Y /E WebApplication\ClientApp\coverage\* output\report\coverage\ 26 | 27 | Write-Host "**** Shutting down the server ****" 28 | Stop-Process $serverProcess 29 | } -------------------------------------------------------------------------------- /cicd/waitForServer.ps1: -------------------------------------------------------------------------------- 1 | # turn off warning about self-signed certificate 2 | 3 | if (-not("dummy" -as [type])) { 4 | add-type -TypeDefinition @" 5 | using System; 6 | using System.Net; 7 | using System.Net.Security; 8 | using System.Security.Cryptography.X509Certificates; 9 | 10 | public static class Dummy { 11 | public static bool ReturnTrue(object sender, 12 | X509Certificate certificate, 13 | X509Chain chain, 14 | SslPolicyErrors sslPolicyErrors) { return true; } 15 | 16 | public static RemoteCertificateValidationCallback GetDelegate() { 17 | return new RemoteCertificateValidationCallback(Dummy.ReturnTrue); 18 | } 19 | } 20 | "@ 21 | } 22 | 23 | [System.Net.ServicePointManager]::ServerCertificateValidationCallback = [dummy]::GetDelegate() 24 | 25 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 26 | while ($statusCode -ne 200) { 27 | # wait a bit between requests 28 | sleep 10 29 | # make request agains local server 30 | $statusCode = try { 31 | $responce = $(Invoke-WebRequest -Uri 'https://localhost:5001' -UseBasicParsing -ErrorAction Stop) 32 | $responce.StatusCode 33 | } catch { 34 | 404 35 | } 36 | } 37 | 38 | Write-Host "Server responded. Waiting is over." -------------------------------------------------------------------------------- /img/APIs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/APIs.png -------------------------------------------------------------------------------- /img/AppBundleZips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/AppBundleZips.png -------------------------------------------------------------------------------- /img/BuildSolution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/BuildSolution.png -------------------------------------------------------------------------------- /img/DebugApp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/DebugApp.png -------------------------------------------------------------------------------- /img/Deploy/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/0.png -------------------------------------------------------------------------------- /img/Deploy/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/1.png -------------------------------------------------------------------------------- /img/Deploy/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/10.png -------------------------------------------------------------------------------- /img/Deploy/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/11.png -------------------------------------------------------------------------------- /img/Deploy/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/12.png -------------------------------------------------------------------------------- /img/Deploy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/2.png -------------------------------------------------------------------------------- /img/Deploy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/3.png -------------------------------------------------------------------------------- /img/Deploy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/4.png -------------------------------------------------------------------------------- /img/Deploy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/5.png -------------------------------------------------------------------------------- /img/Deploy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/6.png -------------------------------------------------------------------------------- /img/Deploy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/7.png -------------------------------------------------------------------------------- /img/Deploy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/8.png -------------------------------------------------------------------------------- /img/Deploy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/Deploy/9.png -------------------------------------------------------------------------------- /img/DotnetRunInitialize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/DotnetRunInitialize.png -------------------------------------------------------------------------------- /img/SuccessfulBuild.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/SuccessfulBuild.png -------------------------------------------------------------------------------- /img/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/img/architecture.png -------------------------------------------------------------------------------- /thumbnail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autodesk-platform-services/aps-configurator-inventor/2ce18b252dda8d440cd070c4cc0bb8f514f9a0ab/thumbnail.gif --------------------------------------------------------------------------------