├── .gitattributes ├── .gitignore ├── README.md ├── docs ├── Lab1 │ ├── edX-DEV212x-Lab1.md │ └── media │ │ ├── add-git-path.png │ │ ├── confirm-name-vsts.png │ │ ├── create-ms-account.png │ │ ├── create-new-vsts-account.png │ │ ├── create-your-account.png │ │ ├── git-download-site.png │ │ ├── vsts-sign-in-no-account.png │ │ ├── vsts-sign-in.png │ │ └── vsts-team-project-dashboard.png ├── Lab3 │ ├── edX-DEV212x-Lab3.md │ └── media │ │ ├── add_copy_publish_build_artifacts.png │ │ ├── add_msbuild_args.png │ │ ├── add_solution_to_source_control.png │ │ ├── build_hub.png │ │ ├── clone.png │ │ ├── clone_vsts_repo_vs.png │ │ ├── commit_and_sync.png │ │ ├── connect_to_vsts.png │ │ ├── create_new_definition.png │ │ ├── download.png │ │ ├── edit_home_controller.png │ │ ├── extract_parts_unlimited.png │ │ ├── findVstsRepoUrl.png │ │ ├── manage_connections.png │ │ ├── nuget_restore.png │ │ ├── open_home_controller.png │ │ ├── open_pu_solution.png │ │ ├── parts_unlimited_vsts.png │ │ ├── publish_arm_templates.png │ │ ├── remove_copy_task.png │ │ ├── save_build_definition.png │ │ ├── select_repo_trigger_queue.png │ │ ├── select_vs_template.png │ │ ├── update_copy_publish_artifact.png │ │ ├── view_build_console.png │ │ ├── view_build_summary.png │ │ └── view_running_build.png └── Lab4 │ ├── edX-DEV212x-Lab4.md │ └── media │ ├── 1.png │ ├── 10.png │ ├── 11.png │ ├── 12.png │ ├── 15.png │ ├── 2.png │ ├── 21.png │ ├── 27.png │ ├── 28.png │ ├── 29.png │ ├── 3.png │ ├── 32.png │ ├── 33.png │ ├── 34.png │ ├── 35.png │ ├── 36.png │ ├── 37.png │ ├── 38.png │ ├── 39.png │ ├── 4.png │ ├── 41.png │ ├── 42.png │ ├── 43.png │ ├── 44.png │ ├── 45.png │ ├── 46.png │ ├── 47.png │ ├── 48.png │ ├── 49.png │ ├── 5.png │ ├── 50.png │ ├── 51.png │ ├── 52.png │ ├── 53.png │ ├── 54.png │ ├── 55.png │ ├── 56.png │ ├── 57.png │ ├── 58.png │ ├── 59.png │ ├── 6.png │ ├── 60.png │ ├── 61.png │ ├── 62.png │ ├── 63.png │ ├── 7.png │ ├── 8.png │ ├── 9.png │ ├── configureArmStep.png │ ├── enterServiceEndpointData.png │ ├── serviceEndpoint.png │ └── viewArtifacts.png └── src ├── LICENSE ├── PartsUnlimited.sln ├── README.md ├── deploy.cmd ├── docs ├── Deployment.md ├── GettingStarted.md └── img │ └── PowerShellToolsVS.jpg ├── env └── PartsUnlimitedEnv │ ├── Deployment.targets │ ├── PartsUnlimitedEnv.deployproj │ ├── Scripts │ ├── Deploy-AzureResourceGroup.ps1 │ ├── Install-AzCopy.ps1 │ └── New-CdnStorageContainer.psm1 │ ├── Templates │ ├── AppInsights.json │ ├── DemoEnvironmentSetup.json │ ├── DemoEnvironmentSetup.param.json │ ├── FullEnvironmentSetup.json │ ├── FullEnvironmentSetup.param.json │ ├── FullEnvironmentSetupMerged.json │ ├── FullEnvironmentSetupMerged.param.json │ ├── HostingPlanAndRules.json │ ├── SqlServerAndDb.json │ ├── Website.json │ ├── WebsiteRules.json │ └── WebsiteWithTwoSlots.json │ └── tools │ ├── AzCopy.exe │ ├── License (Microsoft Azure Storage Tools).rtf │ ├── Microsoft.Data.Edm.dll │ ├── Microsoft.Data.OData.dll │ ├── Microsoft.Data.Services.Client.dll │ ├── Microsoft.WindowsAzure.Storage.DataMovement.dll │ ├── Microsoft.WindowsAzure.Storage.TableDataMovement.dll │ ├── Microsoft.WindowsAzure.Storage.dll │ ├── Newtonsoft.Json.dll │ ├── System.Spatial.dll │ └── Third Party Notice (Microsoft Azure Storage Tools).rtf ├── src └── PartsUnlimitedWebsite │ ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── IdentityConfig.cs │ ├── RouteConfig.cs │ ├── Startup.Auth.cs │ ├── UnityConfig.cs │ └── WebApiConfig.cs │ ├── ApplicationInsights.config │ ├── Areas │ └── Admin │ │ ├── AdminAreaRegistration.cs │ │ ├── AdminConstants.cs │ │ ├── Controllers │ │ ├── AdminController.cs │ │ ├── CustomerController.cs │ │ ├── OrdersController.cs │ │ ├── RaincheckController.cs │ │ └── StoreManagerController.cs │ │ └── Views │ │ ├── Customer │ │ ├── Find.cshtml │ │ └── Index.cshtml │ │ ├── Orders │ │ ├── Details.cshtml │ │ └── Index.cshtml │ │ ├── Raincheck │ │ └── Index.cshtml │ │ ├── StoreManager │ │ ├── Create.cshtml │ │ ├── Details.cshtml │ │ ├── Edit.cshtml │ │ ├── Index.cshtml │ │ └── RemoveProduct.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── Content │ ├── Account.css │ ├── Account.css.map │ ├── Account.min.css │ ├── Account.scss │ ├── Home.css │ ├── Home.css.map │ ├── Home.min.css │ ├── Home.scss │ ├── ShoppingCart.css │ ├── ShoppingCart.css.map │ ├── ShoppingCart.min.css │ ├── ShoppingCart.scss │ ├── Site.css │ ├── Site.css.map │ ├── Site.min.css │ ├── Site.scss │ ├── Store.css │ ├── Store.css.map │ ├── Store.min.css │ ├── Store.scss │ ├── _Settings.scss │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── jquery-ui.css │ └── themes │ │ └── base │ │ ├── accordion.css │ │ ├── all.css │ │ ├── autocomplete.css │ │ ├── base.css │ │ ├── button.css │ │ ├── core.css │ │ ├── datepicker.css │ │ ├── dialog.css │ │ ├── draggable.css │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── menu.css │ │ ├── progressbar.css │ │ ├── resizable.css │ │ ├── selectable.css │ │ ├── selectmenu.css │ │ ├── slider.css │ │ ├── sortable.css │ │ ├── spinner.css │ │ ├── tabs.css │ │ ├── theme.css │ │ └── tooltip.css │ ├── Controllers │ ├── AccountController.cs │ ├── CheckoutController.cs │ ├── HomeController.cs │ ├── ManageController.cs │ ├── OrdersController.cs │ ├── RecommendationsController.cs │ ├── SearchController.cs │ ├── ShoppingCartController.cs │ └── StoreController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Hubs │ └── AnnouncementHub.cs │ ├── Images │ ├── admin_icon.png │ ├── admin_mo_icon.png │ ├── cart_icon.png │ ├── cart_mo_icon.png │ ├── community_1.png │ ├── community_2.png │ ├── community_3.png │ ├── community_4.png │ ├── deploy_button.png │ ├── facebook_icon.jpg │ ├── hero_image1.jpg │ ├── hero_image2.jpg │ ├── hero_image3.jpg │ ├── home_icon.png │ ├── home_mo_icon.png │ ├── login_profile_icon.png │ ├── login_safe_icon.png │ ├── mobile_search_icon.png │ ├── product_batteries_basic-battery.jpg │ ├── product_batteries_jumper-leads.jpg │ ├── product_batteries_premium-battery.jpg │ ├── product_brakes_disc-calipers-red.jpg │ ├── product_brakes_disc.jpg │ ├── product_brakes_disk-pad-combo.jpg │ ├── product_lighting_bugeye-headlight.jpg │ ├── product_lighting_headlight.jpg │ ├── product_lighting_lightbulb.jpg │ ├── product_oil_filters.jpg │ ├── product_oil_oil-filter-combo.jpg │ ├── product_oil_premium-oil.jpg │ ├── product_wheel_rim-blue.jpg │ ├── product_wheel_rim-red.jpg │ ├── product_wheel_rim.jpg │ ├── product_wheel_tyre-rim-chrome-combo.jpg │ ├── product_wheel_tyre-wheel-combo-pack.jpg │ ├── product_wheel_tyre-wheel-combo.jpg │ ├── profile_icon.png │ ├── profile_mo_icon.png │ ├── remove_icon.png │ ├── search_icon.png │ ├── search_mo_icon.png │ ├── shopnow_button.png │ ├── social_placeholder.png │ ├── submenu_image1.jpg │ ├── submenu_image2.jpg │ ├── submenu_image3.jpg │ ├── submenu_image4.jpg │ └── unlimited_logo.png │ ├── Migrations │ ├── 201503130633247_InitialMigration.Designer.cs │ ├── 201503130633247_InitialMigration.cs │ └── PartsUnlimitedContextModelSnapshot.cs │ ├── Models │ ├── AccountViewModels.cs │ ├── ApplicationUser.cs │ ├── CartItem.cs │ ├── Category.cs │ ├── CommunityPost.cs │ ├── IPartsUnlimitedContext.cs │ ├── ManageViewModels.cs │ ├── Manufacturer.cs │ ├── Order.cs │ ├── OrderCostSummary.cs │ ├── OrderDetail.cs │ ├── PartsUnlimitedContext.cs │ ├── Product.cs │ ├── Raincheck.cs │ ├── ShoppingCart.cs │ ├── Store.cs │ └── project.json │ ├── PartsUnlimitedWebsite.csproj │ ├── ProductSearch │ ├── IProductSearch.cs │ └── StringContainsProductSearch.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Recommendations │ ├── AzureMLFrequentlyBoughtTogetherRecommendationEngine.cs │ ├── IRecommendationEngine.cs │ └── NaiveRecommendationEngine.cs │ ├── Scripts │ ├── AppInsights.js │ ├── NewStoreArrivals.js │ ├── Recommendations.js │ ├── UI-Initialization.js │ ├── _references.js │ ├── ai.0.15.0-build58334.js │ ├── ai.0.15.0-build58334.min.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.9.1.intellisense.js │ ├── jquery-1.9.1.js │ ├── jquery-1.9.1.min.js │ ├── jquery-1.9.1.min.map │ ├── jquery-ui-1.11.4.js │ ├── jquery-ui-1.11.4.min.js │ ├── jquery.signalR-2.2.0.js │ ├── jquery.signalR-2.2.0.min.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── jquery.zoom.js │ ├── jquery.zoom.min.js │ ├── modernizr-2.8.3.js │ ├── npm.js │ ├── respond.js │ ├── respond.matchmedia.addListener.js │ ├── respond.matchmedia.addListener.min.js │ └── respond.min.js │ ├── Security │ ├── ConfigurationLoginProviderCredentials.cs │ ├── ConfigurationLoginProviders.cs │ ├── ILoginProviderCredentials.cs │ └── ILoginProviders.cs │ ├── Startup.cs │ ├── Utils │ ├── ConfigurationHelpers.cs │ ├── EmptyTelemetryProvider.cs │ ├── HtmlHelperExtensions.cs │ ├── HttpClientWrapper.cs │ ├── IHttpClient.cs │ ├── IOrdersQuery.cs │ ├── IRaincheckQuery.cs │ ├── ITelemetryProvider.cs │ ├── LayoutDataAttribute.cs │ ├── OrdersQuery.cs │ ├── PartsUnlimitedDbInitializer.cs │ ├── PartsUnlimitedTelemetryInitializer.cs │ ├── RaincheckQuery.cs │ ├── SignalRDependencyResolver.cs │ └── TelemetryProvider.cs │ ├── ViewModels │ ├── AlbumData.cs │ ├── EditProductViewModel.cs │ ├── HomeViewModel.cs │ ├── OrderDetailsViewModel.cs │ ├── OrdersModel.cs │ ├── ProductViewModel.cs │ ├── ShoppingCartRemoveViewModel.cs │ └── ShoppingCartViewModel.cs │ ├── Views │ ├── Account │ │ ├── ConfirmEmail.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── Login.cshtml │ │ ├── Register.cshtml │ │ ├── RegisterConfirmation.cshtml │ │ ├── ResetPassword.cshtml │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── SendCode.cshtml │ │ ├── VerifyCode.cshtml │ │ └── _ExternalLoginsListPartial.cshtml │ ├── Checkout │ │ ├── AddressAndPayment.cshtml │ │ └── Complete.cshtml │ ├── Home │ │ ├── Index.cshtml │ │ └── Recomendations.cshtml │ ├── Manage │ │ ├── AddPhoneNumber.cshtml │ │ ├── ChangePassword.cshtml │ │ ├── Index.cshtml │ │ ├── ManageLogins.cshtml │ │ ├── SetPassword.cshtml │ │ └── VerifyPhoneNumber.cshtml │ ├── Orders │ │ ├── Details.cshtml │ │ └── Index.cshtml │ ├── Search │ │ └── Index.cshtml │ ├── Shared │ │ ├── DemoLinkDisplay.cshtml │ │ ├── Error.cshtml │ │ ├── Lockout.cshtml │ │ ├── _AdminMenu.cshtml │ │ ├── _Announcement.cshtml │ │ ├── _CartSummary.cshtml │ │ ├── _CategoryMenu.cshtml │ │ ├── _CommunityList.cshtml │ │ ├── _Layout.cshtml │ │ ├── _Login.cshtml │ │ ├── _Order.cshtml │ │ ├── _OrderCostSummary.cshtml │ │ ├── _OrdersSearch.cshtml │ │ ├── _ProductList.cshtml │ │ └── _Recommendations.cshtml │ ├── ShoppingCart │ │ └── Index.cshtml │ ├── Store │ │ ├── Browse.cshtml │ │ ├── Details.cshtml │ │ └── Index.cshtml │ ├── Web.config │ └── _ViewStart.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── api │ ├── ProductsController.cs │ └── RaincheckController.cs │ ├── favicon.ico │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── packages.config └── test └── PartsUnlimited.UnitTests ├── Controllers ├── HomeControllerTests.cs └── OrdersControllerTests.cs ├── Fakes ├── FakeDataContext.cs ├── MockHttpContext.cs └── TestDbSet.cs ├── PartsUnlimited.UnitTests.csproj ├── ProductSearch └── ProductSearchTests.cs ├── Properties └── AssemblyInfo.cs ├── Recommendations └── AzureMLFrequentlyBoughtTogetherRecommendationsTests.cs ├── Utils └── OrdersQueryTests.cs ├── app.config └── packages.config /README.md: -------------------------------------------------------------------------------- 1 | # EdX Intro to DevOps # 2 | Welcome to the Hands on Labs repository for the [edX DEV212x Intro to DevOps course (Module 1)](https://www.edx.org/course/introduction-devops-microsoft-dev212x-0). 3 | This repo contains all the source code and Hands on Lab manuals for the course. 4 | 5 | ## The LABs ## 6 | Please review the course material and videos before returning to this repository to do the LABs. 7 | 8 | > **NOTE:** LAB 2 is hosted on a different interactive site. 9 | 10 | 1. [LAB 1 - Setting up a Visual Studio Team Services Account](docs/Lab1/edX-DEV212x-Lab1.md) 11 | 1. [LAB 2 - Learn Git Interactively on the tryGit site](https://try.github.io/levels/1/challenges/1) 12 | 1. [LAB 3 - Continuous Integration](docs/Lab3/edX-DEV212x-Lab3.md) 13 | 1. [LAB 4 - Release Management](docs/Lab4/edX-DEV212x-Lab4.md) 14 | -------------------------------------------------------------------------------- /docs/Lab1/media/add-git-path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/add-git-path.png -------------------------------------------------------------------------------- /docs/Lab1/media/confirm-name-vsts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/confirm-name-vsts.png -------------------------------------------------------------------------------- /docs/Lab1/media/create-ms-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/create-ms-account.png -------------------------------------------------------------------------------- /docs/Lab1/media/create-new-vsts-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/create-new-vsts-account.png -------------------------------------------------------------------------------- /docs/Lab1/media/create-your-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/create-your-account.png -------------------------------------------------------------------------------- /docs/Lab1/media/git-download-site.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/git-download-site.png -------------------------------------------------------------------------------- /docs/Lab1/media/vsts-sign-in-no-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/vsts-sign-in-no-account.png -------------------------------------------------------------------------------- /docs/Lab1/media/vsts-sign-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/vsts-sign-in.png -------------------------------------------------------------------------------- /docs/Lab1/media/vsts-team-project-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab1/media/vsts-team-project-dashboard.png -------------------------------------------------------------------------------- /docs/Lab3/media/add_copy_publish_build_artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/add_copy_publish_build_artifacts.png -------------------------------------------------------------------------------- /docs/Lab3/media/add_msbuild_args.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/add_msbuild_args.png -------------------------------------------------------------------------------- /docs/Lab3/media/add_solution_to_source_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/add_solution_to_source_control.png -------------------------------------------------------------------------------- /docs/Lab3/media/build_hub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/build_hub.png -------------------------------------------------------------------------------- /docs/Lab3/media/clone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/clone.png -------------------------------------------------------------------------------- /docs/Lab3/media/clone_vsts_repo_vs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/clone_vsts_repo_vs.png -------------------------------------------------------------------------------- /docs/Lab3/media/commit_and_sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/commit_and_sync.png -------------------------------------------------------------------------------- /docs/Lab3/media/connect_to_vsts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/connect_to_vsts.png -------------------------------------------------------------------------------- /docs/Lab3/media/create_new_definition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/create_new_definition.png -------------------------------------------------------------------------------- /docs/Lab3/media/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/download.png -------------------------------------------------------------------------------- /docs/Lab3/media/edit_home_controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/edit_home_controller.png -------------------------------------------------------------------------------- /docs/Lab3/media/extract_parts_unlimited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/extract_parts_unlimited.png -------------------------------------------------------------------------------- /docs/Lab3/media/findVstsRepoUrl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/findVstsRepoUrl.png -------------------------------------------------------------------------------- /docs/Lab3/media/manage_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/manage_connections.png -------------------------------------------------------------------------------- /docs/Lab3/media/nuget_restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/nuget_restore.png -------------------------------------------------------------------------------- /docs/Lab3/media/open_home_controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/open_home_controller.png -------------------------------------------------------------------------------- /docs/Lab3/media/open_pu_solution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/open_pu_solution.png -------------------------------------------------------------------------------- /docs/Lab3/media/parts_unlimited_vsts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/parts_unlimited_vsts.png -------------------------------------------------------------------------------- /docs/Lab3/media/publish_arm_templates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/publish_arm_templates.png -------------------------------------------------------------------------------- /docs/Lab3/media/remove_copy_task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/remove_copy_task.png -------------------------------------------------------------------------------- /docs/Lab3/media/save_build_definition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/save_build_definition.png -------------------------------------------------------------------------------- /docs/Lab3/media/select_repo_trigger_queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/select_repo_trigger_queue.png -------------------------------------------------------------------------------- /docs/Lab3/media/select_vs_template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/select_vs_template.png -------------------------------------------------------------------------------- /docs/Lab3/media/update_copy_publish_artifact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/update_copy_publish_artifact.png -------------------------------------------------------------------------------- /docs/Lab3/media/view_build_console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/view_build_console.png -------------------------------------------------------------------------------- /docs/Lab3/media/view_build_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/view_build_summary.png -------------------------------------------------------------------------------- /docs/Lab3/media/view_running_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab3/media/view_running_build.png -------------------------------------------------------------------------------- /docs/Lab4/media/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/1.png -------------------------------------------------------------------------------- /docs/Lab4/media/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/10.png -------------------------------------------------------------------------------- /docs/Lab4/media/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/11.png -------------------------------------------------------------------------------- /docs/Lab4/media/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/12.png -------------------------------------------------------------------------------- /docs/Lab4/media/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/15.png -------------------------------------------------------------------------------- /docs/Lab4/media/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/2.png -------------------------------------------------------------------------------- /docs/Lab4/media/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/21.png -------------------------------------------------------------------------------- /docs/Lab4/media/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/27.png -------------------------------------------------------------------------------- /docs/Lab4/media/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/28.png -------------------------------------------------------------------------------- /docs/Lab4/media/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/29.png -------------------------------------------------------------------------------- /docs/Lab4/media/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/3.png -------------------------------------------------------------------------------- /docs/Lab4/media/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/32.png -------------------------------------------------------------------------------- /docs/Lab4/media/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/33.png -------------------------------------------------------------------------------- /docs/Lab4/media/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/34.png -------------------------------------------------------------------------------- /docs/Lab4/media/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/35.png -------------------------------------------------------------------------------- /docs/Lab4/media/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/36.png -------------------------------------------------------------------------------- /docs/Lab4/media/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/37.png -------------------------------------------------------------------------------- /docs/Lab4/media/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/38.png -------------------------------------------------------------------------------- /docs/Lab4/media/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/39.png -------------------------------------------------------------------------------- /docs/Lab4/media/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/4.png -------------------------------------------------------------------------------- /docs/Lab4/media/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/41.png -------------------------------------------------------------------------------- /docs/Lab4/media/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/42.png -------------------------------------------------------------------------------- /docs/Lab4/media/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/43.png -------------------------------------------------------------------------------- /docs/Lab4/media/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/44.png -------------------------------------------------------------------------------- /docs/Lab4/media/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/45.png -------------------------------------------------------------------------------- /docs/Lab4/media/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/46.png -------------------------------------------------------------------------------- /docs/Lab4/media/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/47.png -------------------------------------------------------------------------------- /docs/Lab4/media/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/48.png -------------------------------------------------------------------------------- /docs/Lab4/media/49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/49.png -------------------------------------------------------------------------------- /docs/Lab4/media/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/5.png -------------------------------------------------------------------------------- /docs/Lab4/media/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/50.png -------------------------------------------------------------------------------- /docs/Lab4/media/51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/51.png -------------------------------------------------------------------------------- /docs/Lab4/media/52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/52.png -------------------------------------------------------------------------------- /docs/Lab4/media/53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/53.png -------------------------------------------------------------------------------- /docs/Lab4/media/54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/54.png -------------------------------------------------------------------------------- /docs/Lab4/media/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/55.png -------------------------------------------------------------------------------- /docs/Lab4/media/56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/56.png -------------------------------------------------------------------------------- /docs/Lab4/media/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/57.png -------------------------------------------------------------------------------- /docs/Lab4/media/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/58.png -------------------------------------------------------------------------------- /docs/Lab4/media/59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/59.png -------------------------------------------------------------------------------- /docs/Lab4/media/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/6.png -------------------------------------------------------------------------------- /docs/Lab4/media/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/60.png -------------------------------------------------------------------------------- /docs/Lab4/media/61.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/61.png -------------------------------------------------------------------------------- /docs/Lab4/media/62.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/62.png -------------------------------------------------------------------------------- /docs/Lab4/media/63.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/63.png -------------------------------------------------------------------------------- /docs/Lab4/media/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/7.png -------------------------------------------------------------------------------- /docs/Lab4/media/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/8.png -------------------------------------------------------------------------------- /docs/Lab4/media/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/9.png -------------------------------------------------------------------------------- /docs/Lab4/media/configureArmStep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/configureArmStep.png -------------------------------------------------------------------------------- /docs/Lab4/media/enterServiceEndpointData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/enterServiceEndpointData.png -------------------------------------------------------------------------------- /docs/Lab4/media/serviceEndpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/serviceEndpoint.png -------------------------------------------------------------------------------- /docs/Lab4/media/viewArtifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/docs/Lab4/media/viewArtifacts.png -------------------------------------------------------------------------------- /src/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Microsoft. All rights reserved. 2 | 3 | The MIT License (MIT) 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | # Parts Unlimited# 2 | 3 | Parts Unlimited is an example eCommerce website site based for training purposes on the website described in chapters 31-35 of The Phoenix Project, by Gene Kim, Kevin Behr and George Spafford, © 2013 IT Revolution Press LLC, Portland, OR. Resemblance to “Project Unicorn” in the novel is intentional; resemblance to any real company is purely coincidental. 4 | 5 | To read more about this project, please view the [Getting Started docs](docs/GettingStarted.md). The website includes product listings by category, product details, shopping cart, order history, product recommendations, search, and more. To get started learning about building and managing the site, visit the Parts Unlimited docs for hands-on labs. 6 | 7 | ## Key Features## 8 | - Works with Visual Studio 2013 Update 4 (other versions may work but not tested) 9 | - Uses ASP.NET 4.5 10 | - Modern HTML5 responsive layout using bootstrap for mobile, tablet, and PC 11 | - Designed for Azure Websites, including Testing in Production, Staging slots and environment variables for feature flags (to turn off recommendations) 12 | - Basic administration pages to add or edit product information 13 | - Includes Azure RM JSON templates and PowerShell automation scripts to easily build and provision your environment 14 | 15 | **Media Elements and Templates.** You may copy and use images, clip art, animations, sounds, music, shapes, video clips and templates provided with the sample application and identified for such use in documents and projects that you create using the sample application. These use rights only apply to your use of the sample application and you may not redistribute such media otherwise. 16 | -------------------------------------------------------------------------------- /src/docs/GettingStarted.md: -------------------------------------------------------------------------------- 1 | # Getting Started# 2 | 3 | ## Set up your machine ## 4 | 1. Install [Visual Studio 2013 Update 4 or 2015 RC](http://www.visualstudio.com) 5 | 2. Install [Microsoft Web Platform Installer](http://www.microsoft.com/web/downloads/platform.aspx) 6 | 3. When Web Platform Installer opens, click the Add button for `Microsoft Azure SDK for .NET (VS 2013 or VS 2015) - 2.6` 7 | 4. Click the Install button and follow the prompts to complete the installation 8 | 9 | ## Get the source code ## 10 | 1. Open Visual Studio 2013 or 2015 11 | 2. Go to View -> Team Explorer 12 | 3. On the Connect page of the Team Explorer window, click the Clone dropdown located under the Local Git Repositories section 13 | 4. Enter the URL (insert URL to the Microsoft GitHub for Parts Unlimited here) 14 | 5. If desired, change the local repository path 15 | 6. Click the Clone button 16 | 17 | ## Begin working with the Parts Unlimited solution ## 18 | 1. On the Home page of the Team Explorer window, open the solution by double-clicking PartsUnlimited.sln listed under the Solutions section. If you do not see it listed under the Solutions section, click the Open... link and navigate the local repository folder to open PartsUnlimited.sln. 19 | 2. After opening the solution, wait for the Output window Package Manager pane to show "Restore complete" and "Total time" messages. 20 | 3. Go to Build -> Build Solution. 21 | 4. Go to Debug -> Start Debugging to launch the web application and attach the debugger. -------------------------------------------------------------------------------- /src/docs/img/PowerShellToolsVS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/docs/img/PowerShellToolsVS.jpg -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/Scripts/Install-AzCopy.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [string] $toolsPath = "$PSScriptRoot\..\tools" 3 | ) 4 | 5 | $azcopy = "$toolsPath\azcopy.exe" 6 | 7 | if(Test-Path $azcopy){ 8 | Write-Output "AzCopy.exe has already been downloaded." 9 | } else { 10 | $bootstrap = "$env:TEMP\azcopy_"+[System.Guid]::NewGuid() 11 | $output = "$bootstrap\extracted" 12 | $msi = "$bootstrap\MicrosoftAzureStorageTools.msi" 13 | 14 | Write-Output "Downloading AzCopy." 15 | Write-Output "Bootstrap directory: '$bootstrap'" 16 | 17 | mkdir $toolsPath -ErrorAction Ignore | Out-Null 18 | mkdir $bootstrap | Out-Null 19 | 20 | Invoke-WebRequest -Uri "http://aka.ms/downloadazcopy" -OutFile $msi 21 | Unblock-File $msi 22 | 23 | Write-Host "Extracting AzCopy" 24 | Start-Process msiexec -Argument "/a $msi /qb TARGETDIR=$output /quiet" -Wait 25 | 26 | Copy-Item "$output\Microsoft SDKs\Azure\AzCopy\*" $toolsPath -Force 27 | 28 | Remove-Item $bootstrap -Recurse -Force 29 | } 30 | 31 | # Display version of AzCopy.exe downloaded 32 | Get-ChildItem $azcopy |% VersionInfo | Select ProductVersion,FileVersion -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/Scripts/New-CdnStorageContainer.psm1: -------------------------------------------------------------------------------- 1 | # 2 | # New_CdnStorageContainer.psm1 3 | # 4 | Function New-CdnStorageContainer{ 5 | 6 | Param( 7 | [Parameter(Mandatory=$true)][string] $StorageAccountName, 8 | [string] $ContainerName = 'cdn', 9 | [Parameter(Mandatory=$true)][string] $Location 10 | ) 11 | 12 | Switch-AzureMode AzureServiceManagement 13 | 14 | #Create storage account if needed 15 | if (!(Test-AzureName -Storage $StorageAccountName)) { 16 | Write-Verbose "Creating new storage account with name $StorageAccountName" 17 | $storageAccount = New-AzureStorageAccount -StorageAccountName $StorageAccountName -Location $Location -Verbose 18 | if ($storageAccount) 19 | { 20 | Write-Verbose "Created $StorageAccountName storage account in $Location location" 21 | } 22 | else 23 | { 24 | throw "Failed to create a Microsoft Azure storage account." 25 | } 26 | } 27 | 28 | #Set current storage account for subsequents calls 29 | if ($StorageAccountName) { 30 | $subscriptionId = (Get-AzureSubscription -Current).SubscriptionId 31 | Set-AzureSubscription -SubscriptionId $subscriptionId -CurrentStorageAccountName $StorageAccountName 32 | } 33 | 34 | #Check to see if container exists. 35 | if (!(Get-AzureStorageContainer | Where-Object {$_.Name -eq $ContainerName})) { 36 | Write-Verbose "Creating a new storage container named '$ContainerName'" 37 | $storageContainer = New-AzureStorageContainer -Name $ContainerName 38 | Write-Verbose "Created a new storage container named '$ContainerName' already exists in the account '$StorageAccountName'" 39 | } else { 40 | Write-Verbose "A storage container named '$ContainerName' already exists in the account '$StorageAccountName'" 41 | } 42 | 43 | #Set container to all for Blob Read. This is needed to execute the scripts 44 | if ((Get-AzureStorageContainerAcl -Container $ContainerName).PublicAccess -eq 'Off') { 45 | Write-Verbose "Setting Permissions for $ContainerName to 'Blob'" 46 | Set-AzureStorageContainerAcl -Name $ContainerName -Permission Blob 47 | } 48 | 49 | #Return the url for the cdn storage endpoint 50 | $url = [string]::Concat((Get-AzureStorageContainer -Name $ContainerName).Context.BlobEndPoint, $ContainerName) 51 | Write-Verbose "Blob endpoint for $ContainerName is $url" 52 | 53 | return $url 54 | } 55 | -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/Templates/AppInsights.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "WebsiteName": { 6 | "type": "string" 7 | } 8 | }, 9 | "resources": [ 10 | { 11 | "name": "[concat(parameters('WebsiteName'), 'Insights')]", 12 | "type": "Microsoft.Insights/components", 13 | "location": "Central US", 14 | "apiVersion": "2014-04-01", 15 | "tags": { 16 | "displayName": "insightsComponents" 17 | }, 18 | "properties": { 19 | "ApplicationId": "[parameters('WebsiteName')]" 20 | } 21 | } 22 | ], 23 | "outputs": { 24 | "instrumentationKey": { 25 | "type": "string", 26 | "value": "[reference(concat('Microsoft.Insights/components/', parameters('WebsiteName'), 'Insights')).InstrumentationKey]" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/Templates/DemoEnvironmentSetup.param.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "WebsiteName": { 6 | "value": "" 7 | }, 8 | "PartsUnlimitedServerName": { 9 | "value": "" 10 | }, 11 | "PartsUnlimitedHostingPlanName": { 12 | "value": "PartsBasicFree" 13 | }, 14 | "CdnStorageAccountName": { 15 | "value": "" 16 | }, 17 | "CdnStorageContainerName": { 18 | "value": "cdn" 19 | }, 20 | "PartsUnlimitedServerAdminLoginPassword": { 21 | "value": "" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/Templates/FullEnvironmentSetup.param.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "WebsiteName": { 6 | "value": "" 7 | }, 8 | "PartsUnlimitedServerName": { 9 | "value": "" 10 | }, 11 | "PartsUnlimitedHostingPlanName": { 12 | "value": "" 13 | }, 14 | "CdnStorageAccountName": { 15 | "value": "" 16 | }, 17 | "CdnStorageContainerName": { 18 | "value": "" 19 | }, 20 | "CdnStorageAccountNameForDev": { 21 | "value": "" 22 | }, 23 | "CdnStorageContainerNameForDev": { 24 | "value": "" 25 | }, 26 | "CdnStorageAccountNameForStaging": { 27 | "value": "" 28 | }, 29 | "CdnStorageContainerNameForStaging": { 30 | "value": "" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/Templates/FullEnvironmentSetupMerged.param.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "WebsiteName": { 6 | "value": "" 7 | }, 8 | "PartsUnlimitedServerName": { 9 | "value": "" 10 | }, 11 | "PartsUnlimitedHostingPlanName": { 12 | "value": "" 13 | }, 14 | "CdnStorageAccountName": { 15 | "value": "" 16 | }, 17 | "CdnStorageContainerName": { 18 | "value": "" 19 | }, 20 | "CdnStorageAccountNameForDev": { 21 | "value": "" 22 | }, 23 | "CdnStorageContainerNameForDev": { 24 | "value": "" 25 | }, 26 | "CdnStorageAccountNameForStaging": { 27 | "value": "" 28 | }, 29 | "CdnStorageContainerNameForStaging": { 30 | "value": "" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/AzCopy.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/AzCopy.exe -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/Microsoft.Data.Edm.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/Microsoft.Data.Edm.dll -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/Microsoft.Data.OData.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/Microsoft.Data.OData.dll -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/Microsoft.Data.Services.Client.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/Microsoft.Data.Services.Client.dll -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/Microsoft.WindowsAzure.Storage.DataMovement.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/Microsoft.WindowsAzure.Storage.DataMovement.dll -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/Microsoft.WindowsAzure.Storage.TableDataMovement.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/Microsoft.WindowsAzure.Storage.TableDataMovement.dll -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/Microsoft.WindowsAzure.Storage.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/Microsoft.WindowsAzure.Storage.dll -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/env/PartsUnlimitedEnv/tools/System.Spatial.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/env/PartsUnlimitedEnv/tools/System.Spatial.dll -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Optimization; 2 | 3 | namespace PartsUnlimited 4 | { 5 | public class BundleConfig 6 | { 7 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 8 | public static void RegisterBundles(BundleCollection bundles) 9 | { 10 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 11 | "~/Scripts/jquery-{version}.js", 12 | "~/Scripts/jquery-ui-{version}.js")); 13 | 14 | bundles.Add(new ScriptBundle("~/bundles/jquery.validate").Include( 15 | "~/Scripts/jquery.validate.js", 16 | "~/Scripts/jquery.validate.unobtrusive.js")); 17 | 18 | bundles.Add(new ScriptBundle("~/bundles/jquery.zoom").Include( 19 | "~/Scripts/jquery.zoom.js")); 20 | 21 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 22 | "~/Scripts/modernizr-*")); 23 | 24 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 25 | "~/Scripts/bootstrap.js")); 26 | 27 | 28 | bundles.Add(new ScriptBundle("~/bundles/signalr").Include( 29 | "~/Scripts/jquery.signalR-{version}.js", 30 | "~/signalr/hubs")); 31 | 32 | bundles.Add(new ScriptBundle("~/bundles/site").Include( 33 | "~/Scripts/NewStoreArrivals.js", 34 | "~/Scripts/UI-Initialization.js", 35 | "~/Scripts/Recommendations.js")); 36 | 37 | bundles.Add(new ScriptBundle("~/bundles/respond").Include( 38 | "~/Scripts/respond.js")); 39 | 40 | bundles.Add(new StyleBundle("~/Content/css").Include( 41 | "~/Content/bootstrap.css", 42 | "~/Content/jquery-ui.css", 43 | "~/Content/Site.css", 44 | "~/Content/Home.css", 45 | "~/Content/Account.css", 46 | "~/Content/ShoppingCart.css", 47 | "~/Content/Store.css")); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using PartsUnlimited.Utils; 3 | 4 | namespace PartsUnlimited 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | filters.Add(new LayoutDataAttribute()); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/App_Start/IdentityConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNet.Identity; 3 | 4 | namespace PartsUnlimited 5 | { 6 | public class EmailService : IIdentityMessageService 7 | { 8 | public Task SendAsync(IdentityMessage message) 9 | { 10 | return Task.FromResult(0); 11 | } 12 | } 13 | 14 | public class SmsService : IIdentityMessageService 15 | { 16 | public Task SendAsync(IdentityMessage message) 17 | { 18 | return Task.FromResult(0); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using System.Web.Routing; 3 | 4 | namespace PartsUnlimited 5 | { 6 | public class RouteConfig 7 | { 8 | public static void RegisterRoutes(RouteCollection routes) 9 | { 10 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 11 | 12 | routes.MapRoute( 13 | name: "default", 14 | url: "{controller}/{action}/{id}", 15 | defaults: new {controller = "Home", action = "Index", id = UrlParameter.Optional}, 16 | namespaces: new string[] { "PartsUnlimited.Controllers" }); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/App_Start/UnityConfig.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Practices.Unity; 2 | using PartsUnlimited.Models; 3 | using PartsUnlimited.ProductSearch; 4 | using PartsUnlimited.Recommendations; 5 | using PartsUnlimited.Utils; 6 | 7 | namespace PartsUnlimited 8 | { 9 | public class UnityConfig 10 | { 11 | public static UnityContainer BuildContainer() 12 | { 13 | var container = new UnityContainer(); 14 | 15 | container.RegisterType(); 16 | container.RegisterType(); 17 | container.RegisterType(); 18 | container.RegisterType(); 19 | container.RegisterType(); 20 | container.RegisterType(); 21 | 22 | container.RegisterInstance(container.Resolve()); 23 | 24 | return container; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using Microsoft.Practices.Unity; 3 | using Unity.WebApi; 4 | 5 | namespace PartsUnlimited 6 | { 7 | public class WebApiConfig 8 | { 9 | public static void RegisterWebApi(HttpConfiguration config, IUnityContainer container) 10 | { 11 | config.DependencyResolver = new UnityDependencyResolver(container); 12 | 13 | // Web API routes 14 | config.MapHttpAttributeRoutes(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/AdminAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace PartsUnlimited.Areas.Admin 4 | { 5 | public class AdminAreaRegistration : AreaRegistration 6 | { 7 | public override void RegisterArea(AreaRegistrationContext context) 8 | { 9 | context.MapRoute( 10 | "admin_default", 11 | "Admin/{controller}/{action}/{id}", 12 | new { action = "Index", id = UrlParameter.Optional }, 13 | namespaces: new string[] { "PartsUnlimited.Areas.Admin.Controllers" } 14 | ); 15 | } 16 | 17 | public override string AreaName 18 | { 19 | get { return AdminConstants.Area; } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/AdminConstants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PartsUnlimited.Areas.Admin 4 | { 5 | public static class AdminConstants 6 | { 7 | public const string Area = "Admin"; 8 | public const string Role = "Administrator"; 9 | 10 | public static class ManageStore 11 | { 12 | public const string Name = "ManageStore"; 13 | public const string Allowed = "Allowed"; 14 | public const string NotAllowed = "false"; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Controllers/AdminController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace PartsUnlimited.Areas.Admin.Controllers 4 | { 5 | [Authorize(Roles = AdminConstants.Role)] 6 | public abstract class AdminController : Controller 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Controllers/CustomerController.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | using System; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using System.Web.Mvc; 7 | 8 | namespace PartsUnlimited.Areas.Admin.Controllers 9 | { 10 | public class CustomerController : AdminController 11 | { 12 | private readonly IPartsUnlimitedContext _context; 13 | 14 | public CustomerController(IPartsUnlimitedContext context) 15 | { 16 | _context = context; 17 | } 18 | 19 | public async Task Index(string id) 20 | { 21 | if (string.IsNullOrEmpty(id)) 22 | { 23 | return Redirect("Find"); 24 | } 25 | 26 | var user = await _context.Users.SingleOrDefaultAsync(u => u.Id == id); 27 | 28 | if (user == null) 29 | { 30 | return Redirect("Find"); 31 | } 32 | 33 | return View(user); 34 | } 35 | 36 | public async Task Find(string username, string email, string phoneNumber) 37 | { 38 | IQueryable query = _context.Users; 39 | 40 | if (!string.IsNullOrWhiteSpace(username)) 41 | { 42 | query = query.Where(u => u.UserName == username); 43 | } 44 | 45 | if (!string.IsNullOrWhiteSpace(email)) 46 | { 47 | query = query.Where(u => u.Email == email); 48 | } 49 | 50 | if (!string.IsNullOrWhiteSpace(phoneNumber)) 51 | { 52 | query = query.Where(u => u.PhoneNumber == phoneNumber); 53 | } 54 | 55 | // We only want cases where there is one instance. SingleOrDefault will throw an exception 56 | // when there is more than one, so we take two and only use the result if it was the only one 57 | var result = await query.Take(2).ToListAsync(); 58 | 59 | if (result.Count == 1) 60 | { 61 | return RedirectToAction("Index", new { id = result[0].Id }); 62 | } 63 | 64 | return View(); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Controllers/OrdersController.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Utils; 2 | using System; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Web.Mvc; 6 | using PartsUnlimited.Models; 7 | using PartsUnlimited.ViewModels; 8 | 9 | namespace PartsUnlimited.Areas.Admin.Controllers 10 | { 11 | public class OrdersController : AdminController 12 | { 13 | private readonly IOrdersQuery _ordersQuery; 14 | 15 | public OrdersController(IOrdersQuery ordersQuery) 16 | { 17 | _ordersQuery = ordersQuery; 18 | } 19 | 20 | public async Task Index(string username, DateTime? start, DateTime? end, string invalidOrderSearch) 21 | { 22 | return View(await _ordersQuery.IndexHelperAsync(username, start, end, invalidOrderSearch, true)); 23 | } 24 | 25 | public async Task Details(int? id) 26 | { 27 | if (id == null) 28 | { 29 | return RedirectToAction("Index", new { invalidOrderSearch = Request.QueryString["id"] }); 30 | } 31 | 32 | var order = await _ordersQuery.FindOrderAsync(id.Value); 33 | 34 | if (order == null) 35 | { 36 | return RedirectToAction("Index", new { invalidOrderSearch = id.ToString() }); 37 | } 38 | 39 | var itemsCount = order.OrderDetails.Sum(x => x.Quantity); 40 | var subTotal = order.OrderDetails.Sum(x => x.Quantity * x.Product.Price); 41 | var shipping = itemsCount * (decimal)5.00; 42 | var tax = (subTotal + shipping) * (decimal)0.05; 43 | var total = subTotal + shipping + tax; 44 | 45 | var costSummary = new OrderCostSummary 46 | { 47 | CartSubTotal = subTotal.ToString("C"), 48 | CartShipping = shipping.ToString("C"), 49 | CartTax = tax.ToString("C"), 50 | CartTotal = total.ToString("C") 51 | }; 52 | 53 | var viewModel = new OrderDetailsViewModel 54 | { 55 | OrderCostSummary = costSummary, 56 | Order = order 57 | }; 58 | 59 | return View(viewModel); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Controllers/RaincheckController.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Utils; 2 | using System.Threading.Tasks; 3 | using System.Web.Mvc; 4 | 5 | namespace PartsUnlimited.Areas.Admin.Controllers 6 | { 7 | public class RaincheckController : AdminController 8 | { 9 | private readonly IRaincheckQuery _query; 10 | 11 | public RaincheckController(IRaincheckQuery query) 12 | { 13 | _query = query; 14 | } 15 | 16 | public async Task Index() 17 | { 18 | var rainchecks = await _query.GetAllAsync(); 19 | 20 | return View(rainchecks); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/Customer/Find.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Find Customers"; 3 | } 4 | 5 |

Search for customers:

6 | 7 |
8 |
9 |
10 | @using (Html.BeginForm("Find", "Customer", FormMethod.Get)) 11 | { 12 |
13 | 14 | 15 |
16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 |
24 | 25 | } 26 |
27 |
28 |
-------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/Customer/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.ApplicationUser 2 | 3 | @{ 4 | ViewBag.Title = string.Format("Customer - {0}", Model.UserName); 5 | } 6 | 7 |
8 | 9 |
10 |
11 | Customer Information 12 |
13 |
14 |
15 |
16 |
17 |
Username
18 |
@Model.UserName
19 |
20 |
21 |
22 |
23 |
Phone Number
24 |
@Model.PhoneNumber
25 |
26 |
27 |
28 |
29 |
Email
30 |
@Model.Email
31 |
32 |
33 |
34 |
35 |
36 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/Orders/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrderDetailsViewModel 2 | 3 | @{ 4 | if (Model == null) 5 | { 6 | ViewBag.Title = "Unknown order"; 7 | } 8 | else 9 | { 10 | ViewBag.Title = string.Format("Order history for {0}", Model.Order.OrderId); 11 | } 12 | } 13 | 14 | @Html.Partial("_Order", Model) 15 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/Orders/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrdersModel 2 | 3 | @{ 4 | ViewBag.Title = "Order History"; 5 | } 6 | 7 | @Html.Partial("_OrdersSearch", Model) -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/Raincheck/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @{ 4 | ViewBag.Title = "Rainchecks"; 5 | } 6 | 7 |
8 |

9 | Current Rainchecks 10 |

11 |
12 | 13 |
14 | 15 | 16 | 19 | 22 | 25 | 28 | 31 | 34 | 35 | @foreach (var raincheck in Model) 36 | { 37 | 38 | 41 | 44 | 47 | 50 | 53 | 56 | 57 | } 58 |
17 | Product Name 18 | 20 | Price (each) 21 | 23 | Sale Price (each) 24 | 26 | Quantity 27 | 29 | Name 30 | 32 | Store 33 |
39 | @raincheck.Product.Title 40 | 42 | @raincheck.Product.Price 43 | 45 | @raincheck.SalePrice 46 | 48 | @raincheck.Quantity 49 | 51 | @raincheck.Name 52 | 54 | @raincheck.IssuerStore.Name 55 |
59 |
60 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/StoreManager/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Product 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 | @if (Model != null) 8 | { 9 |

Details

10 | 11 |
12 |

Product

13 |
14 |
15 |
16 | @Html.DisplayNameFor(model => model.Category.Name) 17 |
18 | 19 |
20 | @Html.DisplayFor(model => model.Category.Name) 21 |
22 | 23 |
24 | @Html.DisplayNameFor(model => model.Title) 25 |
26 | 27 |
28 | @Html.DisplayFor(model => model.Title) 29 |
30 | 31 |
32 | @Html.DisplayNameFor(model => model.Price) 33 |
34 | 35 |
36 | @Html.DisplayFor(model => model.Price) 37 |
38 | 39 |
40 | @Html.DisplayNameFor(model => model.ProductArtUrl) 41 |
42 | 43 |
44 | @Html.DisplayFor(model => model.ProductArtUrl) 45 |
46 | 47 |
48 |
49 | } 50 | else 51 | { 52 | @Html.Label(null, "Unable to locate the product") 53 | } 54 |

55 | @Html.ActionLink("Edit", "Edit", new { id = Model.ProductId }) | 56 | @Html.ActionLink("Back to List", "Index") 57 |

58 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/StoreManager/RemoveProduct.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Product 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 | @if (Model != null) 8 | { 9 |

Delete Confirmation

10 | 11 |

12 | Are you sure you want to delete the product titled 13 | @Model.Title? 14 |

15 | 16 | using (Html.BeginForm()) 17 | { 18 |

19 | 20 |

21 |

22 | @Html.ActionLink("Back to List", "Index") 23 |

24 | } 25 | } 26 | else 27 | { 28 | @Html.Label(null, "Unable to locate the product") 29 | } 30 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 | 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 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Areas/Admin/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Account.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-width: 992px) { 2 | .col-border-md-right { 3 | border-right: 1px solid #D1D1D1; } 4 | } 5 | 6 | #login-page #login-panel { 7 | margin-bottom: 35px; } 8 | #login-page #login-panel input[type='checkbox'] { 9 | margin-top: 10px; } 10 | #login-page #social-login-form #socialLoginList > div { 11 | margin: 5px 0; } 12 | 13 | #manage-page dt { 14 | width: 200px; 15 | padding-right: 15px; } 16 | 17 | #order-history-page section.section-alt { 18 | padding-left: 15px; 19 | padding-right: 15px; } 20 | #order-history-page .row.order { 21 | border: 1px solid #D1D1D1; 22 | border-top: none; 23 | background-color: #E1E1E1; } 24 | #order-history-page .row.order .order-summary { 25 | padding: 15px; 26 | height: 100%; } 27 | #order-history-page .row.order .order-detail { 28 | background-color: white; 29 | min-height: 90px; } 30 | #order-history-page .row.order .order-detail .order-detail-item { 31 | border-top: 1px solid #D1D1D1; } 32 | #order-history-page .row.order .order-detail .order-detail-item:first-child { 33 | border-top: none; } 34 | #order-history-page .row.order:first-child { 35 | border-top: 1px solid #D1D1D1; } 36 | 37 | #order-detail-page .order-detail, #order-detail-page .order-header { 38 | padding: 0 15px; } 39 | #order-detail-page .order-detail .row { 40 | min-height: 40px; 41 | background-color: white; 42 | border-bottom: 1px solid #D1D1D1; } 43 | #order-detail-page .order-detail .row div { 44 | padding-top: 10px; 45 | padding-bottom: 10px; } 46 | #order-detail-page .order-header { 47 | border-bottom: 1px solid #D1D1D1; } 48 | 49 | .cost-summary { 50 | padding: 15px 15px 0 15px; 51 | font-size: 16px; } 52 | @media screen and (max-width: 767px) { 53 | .cost-summary { 54 | background-color: #FFFFFF; 55 | padding: 15px; } } 56 | .cost-summary hr { 57 | margin: 10px 0; } 58 | .cost-summary .cost-value { 59 | text-align: right; 60 | font-weight: bold; } 61 | .cost-summary .total { 62 | font-size: 18px; 63 | padding-bottom: 15px; } 64 | .cost-summary .total .cost-header { 65 | font-weight: bold; } 66 | 67 | /*# sourceMappingURL=Account.css.map */ -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Account.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Account.css","sources":["Account.scss","_Settings.scss"],"sourcesContent":[],"mappings":"AAGA;EAAA;IAEE,cAAc;;;AAIhB,YAAY;EAEV,eAAe;EAAjB,YAAY,aAAa,KAAK;IAG3B,YAAY;AAMf,YAAY,mBAAmB,mBAAmB;EAG9C,QAAQ;;AAKZ,aAAa;EAEX,OAAO;EACP,eAAe;;AAIjB,oBAAoB,OAAO;EAGzB,cAAc;EACd,eAAe;AACjB,oBAAoB,IAAI;EAGtB,QAAQ;EACR,YAAY;EACZ,kBCxCiB;EDwCnB,oBAAoB,IAAI,OAAO;IAG5B,SAAS;IACT,QAAQ;EACX,oBAAoB,IAAI,OAAO;IAG5B,kBAAkB;IAClB,YAAY;IAAf,oBAAoB,IAAI,OAAO,cAAc;MAGzC,YAAY;IAChB,oBAAoB,IAAI,OAAO,cAAc,kBAAkB;MAG3D,YAAY;AAGhB,oBAAoB,IAAI,MAAM;EAG5B,YAAY;;AAKd,mBAAmB,eAAe,mBAAmB;EAEnD,SAAS;AAGX,mBAAmB,cAAc;EAE9B,YAAY;EACZ,kBAAkB;EAClB,eAAe;EAAlB,mBAAmB,cAAc,KAAK;IAElC,aAAa;IACb,gBAAgB;AAGpB,mBAAmB;EAGjB,eAAe;;AAKjB;EACC,SAAS;EACT,WAAW;EAEV;IAJF;MAKG,kBAAkB;MAClB,SAAS;EACZ,cAAc;IAEZ,QAAQ;EACV,cAAc;IAEZ,YAAY;IACZ,aAAa;EACf,cAAc;IAEZ,WAAW;IACX,gBAAgB;IAAlB,cAAc,OAAO;MAElB,aAAa","names":[]} -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Account.min.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-width:992px){.col-border-md-right{border-right:1px solid #d1d1d1}}#login-page #login-panel{margin-bottom:35px}#login-page #login-panel input[type='checkbox']{margin-top:10px}#login-page #social-login-form #socialLoginList>div{margin:5px 0}#manage-page dt{width:200px;padding-right:15px}#order-history-page section.section-alt{padding-left:15px;padding-right:15px}#order-history-page .row.order{border:1px solid #d1d1d1;border-top:none;background-color:#e1e1e1}#order-history-page .row.order .order-summary{padding:15px;height:100%}#order-history-page .row.order .order-detail{background-color:#fff;min-height:90px}#order-history-page .row.order .order-detail .order-detail-item{border-top:1px solid #d1d1d1}#order-history-page .row.order .order-detail .order-detail-item:first-child{border-top:none}#order-history-page .row.order:first-child{border-top:1px solid #d1d1d1}#order-detail-page .order-detail,#order-detail-page .order-header{padding:0 15px}#order-detail-page .order-detail .row{min-height:40px;background-color:#fff;border-bottom:1px solid #d1d1d1}#order-detail-page .order-detail .row div{padding-top:10px;padding-bottom:10px}#order-detail-page .order-header{border-bottom:1px solid #d1d1d1}.cost-summary{padding:15px 15px 0 15px;font-size:16px}@media screen and (max-width:767px){.cost-summary{background-color:#fff;padding:15px}}.cost-summary hr{margin:10px 0}.cost-summary .cost-value{text-align:right;font-weight:bold}.cost-summary .total{font-size:18px;padding-bottom:15px}.cost-summary .total .cost-header{font-weight:bold} -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Account.scss: -------------------------------------------------------------------------------- 1 | @import 'Settings'; 2 | 3 | 4 | @media screen and (min-width: $size-tablet-max) { 5 | .col-border-md-right { 6 | border-right: 1px solid $color-rule; 7 | } 8 | } 9 | 10 | #login-page { 11 | #login-panel { 12 | margin-bottom: 35px; 13 | 14 | input[type='checkbox'] { 15 | margin-top: 10px; 16 | } 17 | } 18 | 19 | #social-login-form { 20 | 21 | #socialLoginList { 22 | 23 | & > div { 24 | margin: 5px 0; 25 | } 26 | } 27 | } 28 | } 29 | #manage-page{ 30 | dt{ 31 | width: 200px; 32 | padding-right: 15px; 33 | } 34 | } 35 | 36 | #order-history-page { 37 | 38 | section.section-alt { 39 | padding-left: 15px; 40 | padding-right: 15px; 41 | } 42 | 43 | .row.order { 44 | border: 1px solid $color-rule; 45 | border-top: none; 46 | background-color: $color-background; 47 | 48 | .order-summary { 49 | padding: 15px; 50 | height: 100%; 51 | } 52 | 53 | .order-detail { 54 | background-color: white; 55 | min-height: 90px; 56 | 57 | .order-detail-item { 58 | border-top: 1px solid $color-rule; 59 | } 60 | 61 | .order-detail-item:first-child { 62 | border-top: none; 63 | } 64 | } 65 | } 66 | 67 | .row.order:first-child { 68 | border-top: 1px solid $color-rule; 69 | } 70 | } 71 | 72 | 73 | #order-detail-page { 74 | .order-detail, .order-header { 75 | padding: 0 15px; 76 | } 77 | 78 | .order-detail{ 79 | .row{ 80 | min-height: 40px; 81 | background-color: white; 82 | border-bottom: 1px solid $color-rule; 83 | div{ 84 | padding-top: 10px; 85 | padding-bottom: 10px; 86 | } 87 | } 88 | } 89 | 90 | .order-header{ 91 | border-bottom: 1px solid $color-rule; 92 | } 93 | 94 | } 95 | 96 | .cost-summary{ 97 | padding: 15px 15px 0 15px; 98 | font-size: 16px; 99 | 100 | @media screen and (max-width: $size-mobile-max){ 101 | background-color: #FFFFFF; 102 | padding: 15px; 103 | } 104 | hr{ 105 | margin: 10px 0; 106 | } 107 | .cost-value{ 108 | text-align: right; 109 | font-weight: bold; 110 | } 111 | .total{ 112 | font-size: 18px; 113 | padding-bottom: 15px; 114 | .cost-header{ 115 | font-weight: bold; 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/ShoppingCart.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ShoppingCart.css","sources":["ShoppingCart.scss","_Settings.scss"],"sourcesContent":[],"mappings":"AAIE;EAFF,oBAAoB;IAGlB,SAAS;IAAX,oBAAoB,QAAQ,IAAI,oBAAoB,QAAQ;MAGzD,aAAa;MACb,cAAc;AAGjB,oBAAoB,QAAQ;EAE1B,QAAQ;EAAV,oBAAoB,QAAQ,cAAc;IAGvC,SAAS;IACT,aAAa;IACb,WAAW;EACd,oBAAoB,QAAQ,cAAc;IAEvC,kBAAkB;IAClB,eAAe;IACf,UAAU;IACV,SAAS;IAET;MAPH,oBAAoB,QAAQ,cAAc;QAQtC,eAAe;QACf,gBAAgB;QAChB,eAAe;IAGnB,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGrD,WAAU;MAEV;QALL,oBAAoB,QAAQ,cAAc,WAAW,KAAK;UAMpD,WAAU;IAEhB,oBAAoB,QAAQ,cAAc,WAAW,OAAO;MAGvD,QAAQ;IACb,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGpD,QAAQ;MACR,aAAa;MACZ,WAAW;MAEb;QAPL,oBAAoB,QAAQ,cAAc,WAAW,KAAK;UAQnD,aAAa;UACb,QAAQ;IAEf,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGpD,WAAW;MAEZ;QALL,oBAAoB,QAAQ,cAAc,WAAW,KAAK;UAMnD,WAAW;UACX,aAAa;UACd,OC/DU;IDmEZ;MAAJ,oBAAoB,QAAQ,cAAc,WAAW,KAAK;QAGrD,QAAQ;;MACb,oBAAoB,QAAQ,cAAc,WAAW,KAAK;QAGpD,kBCtEa;QDuEb,QAAQ;;IAId,oBAAoB,QAAQ,cAAc,WAAW,KAAK,aAAa;MAEjE,WAAU;MAEX,QAAQ;IAEb,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGrD,UAAU;MACV,OAAO;MACP,QAAQ;MACR,SAAS;MACT,QAAQ;MAAb,oBAAoB,QAAQ,cAAc,WAAW,KAAK,kBAAkB;QAEtE,WAAW;AAKjB,oBAAoB,QAAQ;EAG1B,eAAe;EACf;IAJF,oBAAoB,QAAQ;MAKzB,eAAe;AAElB,oBAAoB,QAAQ;EAGzB,QAAQ;EACR,SAAS;;AAKZ,eAAe;EAEb,WAAW","names":[]} -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/ShoppingCart.min.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width:767px){#shopping-cart-page section{padding:15px 0 0 0}#shopping-cart-page section h2,#shopping-cart-page section #update-message{margin-left:15px;margin-right:15px}}#shopping-cart-page section #cart-summary{margin:3px 0 0 0}#shopping-cart-page section #cart-summary .cart-summary-header{padding:5px 15px;font-weight:bold;font-size:16px}#shopping-cart-page section #cart-summary .cart-item{background-color:#fff;margin-bottom:5px;position:relative;padding:0 15px}@media screen and (max-width:767px){#shopping-cart-page section #cart-summary .cart-item{margin-bottom:0;padding-bottom:0;border-bottom:1px solid #d1d1d1}}#shopping-cart-page section #cart-summary .cart-item .row img{max-width:130px}@media screen and (max-width:767px){#shopping-cart-page section #cart-summary .cart-item .row img{max-width:75px}}#shopping-cart-page section #cart-summary .cart-item .row>div{margin:15px 0}#shopping-cart-page section #cart-summary .cart-item .row .item-label{margin:0;font-weight:normal;font-size:16px}@media screen and (max-width:767px){#shopping-cart-page section #cart-summary .cart-item .row .item-label{font-weight:bold;margin:10px 0}}#shopping-cart-page section #cart-summary .cart-item .row .item-price{font-size:16px}@media screen and (max-width:767px){#shopping-cart-page section #cart-summary .cart-item .row .item-price{font-size:20px;font-weight:bold;color:#1c367c}}@media screen and (max-width:767px){#shopping-cart-page section #cart-summary .cart-item .row .item-inventory{margin:29px 0}#shopping-cart-page section #cart-summary .cart-item .row .description{background-color:#e1e1e1;margin:0}}#shopping-cart-page section #cart-summary .cart-item .row .remove-link img{max-width:40px;margin:20px 0}#shopping-cart-page section #cart-summary .cart-item .row .remove-cart-item{position:absolute;right:0;bottom:0;padding:15px;margin:0}#shopping-cart-page section #cart-summary .cart-item .row .remove-cart-item a{min-width:165px}#shopping-cart-page section .checkout{margin-bottom:10px}@media screen and (min-width:767px){#shopping-cart-page section .checkout{margin-bottom:0}}#shopping-cart-page section #empty-cart{margin:0;padding:15px}#complete-page p{font-size:16px} -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Store.css: -------------------------------------------------------------------------------- 1 | #store-details .details-panel { 2 | position: relative; 3 | height: 100%; 4 | padding: 14px; } 5 | @media screen and (min-width: 992px) { 6 | #store-details .details-panel { 7 | padding-bottom: 45px; } } 8 | @media screen and (min-width: 767px) { 9 | #store-details .details-panel h5 { 10 | margin-top: 0; 11 | margin-bottom: 15px; } 12 | 13 | #store-details .details-panel h4 { 14 | font-size: 20px; 15 | margin-bottom: 15px; } 16 | } 17 | #store-details .details-panel > div > p { 18 | white-space: pre-line; 19 | font-size: 15px; } 20 | #store-details .details-table { 21 | margin-bottom: 55px; } 22 | @media screen and (min-width: 992px) { 23 | #store-details .details-table { 24 | margin-bottom: 0; } } 25 | #store-details .details-table table.table { 26 | margin-bottom: 0; } 27 | #store-details .row { 28 | position: relative; } 29 | #store-details .row > a.add-to-cart { 30 | position: absolute; 31 | bottom: 0; 32 | margin-top: 20px; } 33 | @media screen and (min-width: 767px) { 34 | #store-details .row > a.add-to-cart { 35 | left: 15px; } } 36 | #store-details #product-image { 37 | position: relative; 38 | display: inline-block; } 39 | @media screen and (min-width: 767px) { 40 | #store-details #product-image { 41 | width: 100%; } } 42 | @media screen and (max-width: 992px) { 43 | #store-details #product-image img { 44 | display: block; 45 | margin: 0 auto; 46 | height: 245px; 47 | width: 245px; } } 48 | @media screen and (min-width: 767px) { 49 | #store-details #product-image img { 50 | width: 100%; } } 51 | #store-details #product-image-zoom { 52 | height: 255px; 53 | width: 255px; 54 | padding: 5px; 55 | margin-left: 20px; } 56 | 57 | #search-page { 58 | padding-top: 0; 59 | padding-bottom: 0; } 60 | 61 | #category-page section .list-item-part a .product-image-container .detail h5 { 62 | padding-top: 10px; } 63 | 64 | /*# sourceMappingURL=Store.css.map */ -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Store.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Store.css","sources":["Store.scss","_Settings.scss"],"sourcesContent":[],"mappings":"AAEA,AAAe,AAEb,AAAU,AACV,AAAQ,AACR,AAAS,AACT,AALF,AAAe,AAMb,AAAgB,AAEhB,AAAF,AAAe,AAAe,AAG1B,AAAY,AACZ,AAAe,AACnB,AAAe,AAAe,AAE1B,AAAW,AACX,AAAe,AAInB,AAAe,AAAiB,AAAM,AAElC,AAAa,AACb,AAAW,AAGf,AAAe,AAGb,AAAe,AAChB,AAJD,AAAe,AAKb,AAAe,AACjB,AAAe,AAAe,AAAK,AAEjC,AAAe,AAEjB,AAAe,AAGb,AAAU,AAAZ,AAAe,AAAO,AAAC,AAEpB,AAAU,AACV,AAAQ,AAKP,AAAY,AAHd,AALF,AAAe,AAAO,AAAC,AAMpB,AAAK,AAIR,AAAe,AAGb,AAAU,AACV,AAAS,AAET,AANF,AAAe,AAOZ,AAAO,AAIP,AAHH,AAAe,AAAe,AAI1B,AAAS,AACT,AAAQ,AACR,AAAQ,AACR,AAAO,AAGR,AAVH,AAAe,AAAe,AAW1B,AAAO,AAGX,AAAe,AAGb,AAAQ,AACR,AAAO,AACP,AAAS,AACT,AAAa,AAIf,AACC,AAAa,AACb,AAAgB,AAGjB,AAAe,AAAQ,AAAgB,AAAE,AAAyB,AAAQ,AAExE,AAAa","names":[]} -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Store.min.css: -------------------------------------------------------------------------------- 1 | #store-details .details-panel{position:relative;height:100%;padding:14px}@media screen and (min-width:992px){#store-details .details-panel{padding-bottom:45px}}@media screen and (min-width:767px){#store-details .details-panel h5{margin-top:0;margin-bottom:15px}#store-details .details-panel h4{font-size:20px;margin-bottom:15px}}#store-details .details-panel>div>p{white-space:pre-line;font-size:15px}#store-details .details-table{margin-bottom:55px}@media screen and (min-width:992px){#store-details .details-table{margin-bottom:0}}#store-details .details-table table.table{margin-bottom:0}#store-details .row{position:relative}#store-details .row>a.add-to-cart{position:absolute;bottom:0;margin-top:20px}@media screen and (min-width:767px){#store-details .row>a.add-to-cart{left:15px}}#store-details #product-image{position:relative;display:inline-block}@media screen and (min-width:767px){#store-details #product-image{width:100%}}@media screen and (max-width:992px){#store-details #product-image img{display:block;margin:0 auto;height:245px;width:245px}}@media screen and (min-width:767px){#store-details #product-image img{width:100%}}#store-details #product-image-zoom{height:255px;width:255px;padding:5px;margin-left:20px}#search-page{padding-top:0;padding-bottom:0}#category-page section .list-item-part a .product-image-container .detail h5{padding-top:10px} -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/Store.scss: -------------------------------------------------------------------------------- 1 | @import 'Settings'; 2 | 3 | #store-details { 4 | .details-panel { 5 | position: relative; 6 | height: 100%; 7 | padding: 14px; 8 | @media screen and (min-width : $size-tablet-max) { 9 | padding-bottom: 45px; 10 | } 11 | @media screen and (min-width : $size-mobile-max) { 12 | 13 | h5 { 14 | margin-top: 0; 15 | margin-bottom: 15px; 16 | } 17 | h4 { 18 | font-size: 20px; 19 | margin-bottom: 15px; 20 | } 21 | } 22 | 23 | & > div { 24 | & > p { 25 | white-space: pre-line; 26 | font-size: 15px; 27 | } 28 | } 29 | } 30 | 31 | .details-table{ 32 | margin-bottom: 55px; 33 | @media screen and (min-width : $size-tablet-max) { 34 | margin-bottom: 0; 35 | } 36 | table.table{ 37 | margin-bottom: 0; 38 | } 39 | } 40 | 41 | .row{ 42 | position: relative; 43 | & > a.add-to-cart { 44 | position: absolute; 45 | bottom: 0; 46 | 47 | @media screen and (min-width : $size-mobile-max) { 48 | left:15px; 49 | } 50 | margin-top: 20px; 51 | } 52 | } 53 | 54 | #product-image { 55 | position: relative; 56 | display: inline-block; 57 | 58 | @media screen and (min-width: $size-mobile-max) { 59 | width: 100%; 60 | } 61 | 62 | img { 63 | @media screen and (max-width: $size-tablet-max) { 64 | display: block; 65 | margin: 0 auto; 66 | height: 245px; 67 | width: 245px; 68 | } 69 | 70 | @media screen and (min-width: $size-mobile-max) { 71 | width: 100%; 72 | } 73 | } 74 | } 75 | 76 | #product-image-zoom { 77 | height: 255px; 78 | width: 255px; 79 | padding: 5px; 80 | margin-left: 20px; 81 | } 82 | } 83 | 84 | #search-page { 85 | padding-top: 0; 86 | padding-bottom: 0; 87 | } 88 | 89 | #category-page{ 90 | section .list-item-part a .product-image-container .detail h5{ 91 | padding-top: 10px; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/_Settings.scss: -------------------------------------------------------------------------------- 1 | $color-primary: #424242; 2 | $color-inverse: #1C367C; 3 | $color-white: #EEEEEE; 4 | $color-black: #222222; 5 | $color-error: #B94A48; 6 | $color-background: #E1E1E1; 7 | $color-rule: #D1D1D1; 8 | $color-inverse-background: #2A2A2A; 9 | $color-bar-background: #1C367C; 10 | $font-secondary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 11 | $font-primary: 'Segoe UI Light', $font-secondary; 12 | $font-primary-weight: 300; 13 | $font-primary-bold: 'Segoe UI SemiBold', $font-primary; 14 | $font-primary-bold-weight: 600; 15 | $size-mobile-max: 767px; 16 | $size-tablet-max: 992px; 17 | $size-desktop-max: 1200px; -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/accordion/#theming 10 | */ 11 | .ui-accordion .ui-accordion-header { 12 | display: block; 13 | cursor: pointer; 14 | position: relative; 15 | margin: 2px 0 0 0; 16 | padding: .5em .5em .5em .7em; 17 | min-height: 0; /* support: IE7 */ 18 | font-size: 100%; 19 | } 20 | .ui-accordion .ui-accordion-icons { 21 | padding-left: 2.2em; 22 | } 23 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 24 | padding-left: 2.2em; 25 | } 26 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 27 | position: absolute; 28 | left: .5em; 29 | top: 50%; 30 | margin-top: -8px; 31 | } 32 | .ui-accordion .ui-accordion-content { 33 | padding: 1em 2.2em; 34 | border-top: 0; 35 | overflow: auto; 36 | } 37 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import "base.css"; 12 | @import "theme.css"; 13 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/autocomplete/#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import url("core.css"); 12 | 13 | @import url("accordion.css"); 14 | @import url("autocomplete.css"); 15 | @import url("button.css"); 16 | @import url("datepicker.css"); 17 | @import url("dialog.css"); 18 | @import url("draggable.css"); 19 | @import url("menu.css"); 20 | @import url("progressbar.css"); 21 | @import url("resizable.css"); 22 | @import url("selectable.css"); 23 | @import url("selectmenu.css"); 24 | @import url("sortable.css"); 25 | @import url("slider.css"); 26 | @import url("spinner.css"); 27 | @import url("tabs.css"); 28 | @import url("tooltip.css"); 29 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | 12 | /* Layout helpers 13 | ----------------------------------*/ 14 | .ui-helper-hidden { 15 | display: none; 16 | } 17 | .ui-helper-hidden-accessible { 18 | border: 0; 19 | clip: rect(0 0 0 0); 20 | height: 1px; 21 | margin: -1px; 22 | overflow: hidden; 23 | padding: 0; 24 | position: absolute; 25 | width: 1px; 26 | } 27 | .ui-helper-reset { 28 | margin: 0; 29 | padding: 0; 30 | border: 0; 31 | outline: 0; 32 | line-height: 1.3; 33 | text-decoration: none; 34 | font-size: 100%; 35 | list-style: none; 36 | } 37 | .ui-helper-clearfix:before, 38 | .ui-helper-clearfix:after { 39 | content: ""; 40 | display: table; 41 | border-collapse: collapse; 42 | } 43 | .ui-helper-clearfix:after { 44 | clear: both; 45 | } 46 | .ui-helper-clearfix { 47 | min-height: 0; /* support: IE7 */ 48 | } 49 | .ui-helper-zfix { 50 | width: 100%; 51 | height: 100%; 52 | top: 0; 53 | left: 0; 54 | position: absolute; 55 | opacity: 0; 56 | filter:Alpha(Opacity=0); /* support: IE8 */ 57 | } 58 | 59 | .ui-front { 60 | z-index: 100; 61 | } 62 | 63 | 64 | /* Interaction Cues 65 | ----------------------------------*/ 66 | .ui-state-disabled { 67 | cursor: default !important; 68 | } 69 | 70 | 71 | /* Icons 72 | ----------------------------------*/ 73 | 74 | /* states and images */ 75 | .ui-icon { 76 | display: block; 77 | text-indent: -99999px; 78 | overflow: hidden; 79 | background-repeat: no-repeat; 80 | } 81 | 82 | 83 | /* Misc visuals 84 | ----------------------------------*/ 85 | 86 | /* Overlays */ 87 | .ui-widget-overlay { 88 | position: fixed; 89 | top: 0; 90 | left: 0; 91 | width: 100%; 92 | height: 100%; 93 | } 94 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/dialog.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Dialog 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/dialog/#theming 10 | */ 11 | .ui-dialog { 12 | overflow: hidden; 13 | position: absolute; 14 | top: 0; 15 | left: 0; 16 | padding: .2em; 17 | outline: 0; 18 | } 19 | .ui-dialog .ui-dialog-titlebar { 20 | padding: .4em 1em; 21 | position: relative; 22 | } 23 | .ui-dialog .ui-dialog-title { 24 | float: left; 25 | margin: .1em 0; 26 | white-space: nowrap; 27 | width: 90%; 28 | overflow: hidden; 29 | text-overflow: ellipsis; 30 | } 31 | .ui-dialog .ui-dialog-titlebar-close { 32 | position: absolute; 33 | right: .3em; 34 | top: 50%; 35 | width: 20px; 36 | margin: -10px 0 0 0; 37 | padding: 1px; 38 | height: 20px; 39 | } 40 | .ui-dialog .ui-dialog-content { 41 | position: relative; 42 | border: 0; 43 | padding: .5em 1em; 44 | background: none; 45 | overflow: auto; 46 | } 47 | .ui-dialog .ui-dialog-buttonpane { 48 | text-align: left; 49 | border-width: 1px 0 0 0; 50 | background-image: none; 51 | margin-top: .5em; 52 | padding: .3em 1em .5em .4em; 53 | } 54 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 55 | float: right; 56 | } 57 | .ui-dialog .ui-dialog-buttonpane button { 58 | margin: .5em .4em .5em 0; 59 | cursor: pointer; 60 | } 61 | .ui-dialog .ui-resizable-se { 62 | width: 12px; 63 | height: 12px; 64 | right: -5px; 65 | bottom: -5px; 66 | background-position: 16px 16px; 67 | } 68 | .ui-draggable .ui-dialog-titlebar { 69 | cursor: move; 70 | } 71 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/draggable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Draggable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-draggable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/menu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Menu 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/menu/#theming 10 | */ 11 | .ui-menu { 12 | list-style: none; 13 | padding: 0; 14 | margin: 0; 15 | display: block; 16 | outline: none; 17 | } 18 | .ui-menu .ui-menu { 19 | position: absolute; 20 | } 21 | .ui-menu .ui-menu-item { 22 | position: relative; 23 | margin: 0; 24 | padding: 3px 1em 3px .4em; 25 | cursor: pointer; 26 | min-height: 0; /* support: IE7 */ 27 | /* support: IE10, see #8844 */ 28 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); 29 | } 30 | .ui-menu .ui-menu-divider { 31 | margin: 5px 0; 32 | height: 0; 33 | font-size: 0; 34 | line-height: 0; 35 | border-width: 1px 0 0 0; 36 | } 37 | .ui-menu .ui-state-focus, 38 | .ui-menu .ui-state-active { 39 | margin: -1px; 40 | } 41 | 42 | /* icon support */ 43 | .ui-menu-icons { 44 | position: relative; 45 | } 46 | .ui-menu-icons .ui-menu-item { 47 | padding-left: 2em; 48 | } 49 | 50 | /* left-aligned */ 51 | .ui-menu .ui-icon { 52 | position: absolute; 53 | top: 0; 54 | bottom: 0; 55 | left: .2em; 56 | margin: auto 0; 57 | } 58 | 59 | /* right-aligned */ 60 | .ui-menu .ui-menu-icon { 61 | left: auto; 62 | right: 0; 63 | } 64 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-resizable { 10 | position: relative; 11 | } 12 | .ui-resizable-handle { 13 | position: absolute; 14 | font-size: 0.1px; 15 | display: block; 16 | -ms-touch-action: none; 17 | touch-action: none; 18 | } 19 | .ui-resizable-disabled .ui-resizable-handle, 20 | .ui-resizable-autohide .ui-resizable-handle { 21 | display: none; 22 | } 23 | .ui-resizable-n { 24 | cursor: n-resize; 25 | height: 7px; 26 | width: 100%; 27 | top: -5px; 28 | left: 0; 29 | } 30 | .ui-resizable-s { 31 | cursor: s-resize; 32 | height: 7px; 33 | width: 100%; 34 | bottom: -5px; 35 | left: 0; 36 | } 37 | .ui-resizable-e { 38 | cursor: e-resize; 39 | width: 7px; 40 | right: -5px; 41 | top: 0; 42 | height: 100%; 43 | } 44 | .ui-resizable-w { 45 | cursor: w-resize; 46 | width: 7px; 47 | left: -5px; 48 | top: 0; 49 | height: 100%; 50 | } 51 | .ui-resizable-se { 52 | cursor: se-resize; 53 | width: 12px; 54 | height: 12px; 55 | right: 1px; 56 | bottom: 1px; 57 | } 58 | .ui-resizable-sw { 59 | cursor: sw-resize; 60 | width: 9px; 61 | height: 9px; 62 | left: -5px; 63 | bottom: -5px; 64 | } 65 | .ui-resizable-nw { 66 | cursor: nw-resize; 67 | width: 9px; 68 | height: 9px; 69 | left: -5px; 70 | top: -5px; 71 | } 72 | .ui-resizable-ne { 73 | cursor: ne-resize; 74 | width: 9px; 75 | height: 9px; 76 | right: -5px; 77 | top: -5px; 78 | } 79 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-selectable { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | .ui-selectable-helper { 14 | position: absolute; 15 | z-index: 100; 16 | border: 1px dotted black; 17 | } 18 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/selectmenu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectmenu 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/selectmenu/#theming 10 | */ 11 | .ui-selectmenu-menu { 12 | padding: 0; 13 | margin: 0; 14 | position: absolute; 15 | top: 0; 16 | left: 0; 17 | display: none; 18 | } 19 | .ui-selectmenu-menu .ui-menu { 20 | overflow: auto; 21 | /* Support: IE7 */ 22 | overflow-x: hidden; 23 | padding-bottom: 1px; 24 | } 25 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { 26 | font-size: 1em; 27 | font-weight: bold; 28 | line-height: 1.5; 29 | padding: 2px 0.4em; 30 | margin: 0.5em 0 0 0; 31 | height: auto; 32 | border: 0; 33 | } 34 | .ui-selectmenu-open { 35 | display: block; 36 | } 37 | .ui-selectmenu-button { 38 | display: inline-block; 39 | overflow: hidden; 40 | position: relative; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | .ui-selectmenu-button span.ui-icon { 45 | right: 0.5em; 46 | left: auto; 47 | margin-top: -8px; 48 | position: absolute; 49 | top: 50%; 50 | } 51 | .ui-selectmenu-button span.ui-selectmenu-text { 52 | text-align: left; 53 | padding: 0.4em 2.1em 0.4em 1em; 54 | display: block; 55 | line-height: 1.4; 56 | overflow: hidden; 57 | text-overflow: ellipsis; 58 | white-space: nowrap; 59 | } 60 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/slider.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Slider 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/slider/#theming 10 | */ 11 | .ui-slider { 12 | position: relative; 13 | text-align: left; 14 | } 15 | .ui-slider .ui-slider-handle { 16 | position: absolute; 17 | z-index: 2; 18 | width: 1.2em; 19 | height: 1.2em; 20 | cursor: default; 21 | -ms-touch-action: none; 22 | touch-action: none; 23 | } 24 | .ui-slider .ui-slider-range { 25 | position: absolute; 26 | z-index: 1; 27 | font-size: .7em; 28 | display: block; 29 | border: 0; 30 | background-position: 0 0; 31 | } 32 | 33 | /* support: IE8 - See #6727 */ 34 | .ui-slider.ui-state-disabled .ui-slider-handle, 35 | .ui-slider.ui-state-disabled .ui-slider-range { 36 | filter: inherit; 37 | } 38 | 39 | .ui-slider-horizontal { 40 | height: .8em; 41 | } 42 | .ui-slider-horizontal .ui-slider-handle { 43 | top: -.3em; 44 | margin-left: -.6em; 45 | } 46 | .ui-slider-horizontal .ui-slider-range { 47 | top: 0; 48 | height: 100%; 49 | } 50 | .ui-slider-horizontal .ui-slider-range-min { 51 | left: 0; 52 | } 53 | .ui-slider-horizontal .ui-slider-range-max { 54 | right: 0; 55 | } 56 | 57 | .ui-slider-vertical { 58 | width: .8em; 59 | height: 100px; 60 | } 61 | .ui-slider-vertical .ui-slider-handle { 62 | left: -.3em; 63 | margin-left: 0; 64 | margin-bottom: -.6em; 65 | } 66 | .ui-slider-vertical .ui-slider-range { 67 | left: 0; 68 | width: 100%; 69 | } 70 | .ui-slider-vertical .ui-slider-range-min { 71 | bottom: 0; 72 | } 73 | .ui-slider-vertical .ui-slider-range-max { 74 | top: 0; 75 | } 76 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/sortable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Sortable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-sortable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/spinner.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Spinner 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/spinner/#theming 10 | */ 11 | .ui-spinner { 12 | position: relative; 13 | display: inline-block; 14 | overflow: hidden; 15 | padding: 0; 16 | vertical-align: middle; 17 | } 18 | .ui-spinner-input { 19 | border: none; 20 | background: none; 21 | color: inherit; 22 | padding: 0; 23 | margin: .2em 0; 24 | vertical-align: middle; 25 | margin-left: .4em; 26 | margin-right: 22px; 27 | } 28 | .ui-spinner-button { 29 | width: 16px; 30 | height: 50%; 31 | font-size: .5em; 32 | padding: 0; 33 | margin: 0; 34 | text-align: center; 35 | position: absolute; 36 | cursor: default; 37 | display: block; 38 | overflow: hidden; 39 | right: 0; 40 | } 41 | /* more specificity required here to override default borders */ 42 | .ui-spinner a.ui-spinner-button { 43 | border-top: none; 44 | border-bottom: none; 45 | border-right: none; 46 | } 47 | /* vertically center icon */ 48 | .ui-spinner .ui-icon { 49 | position: absolute; 50 | margin-top: -8px; 51 | top: 50%; 52 | left: 0; 53 | } 54 | .ui-spinner-up { 55 | top: 0; 56 | } 57 | .ui-spinner-down { 58 | bottom: 0; 59 | } 60 | 61 | /* TR overrides */ 62 | .ui-spinner .ui-icon-triangle-1-s { 63 | /* need to fix icons sprite */ 64 | background-position: -65px -16px; 65 | } 66 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/tabs.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tabs 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tabs/#theming 10 | */ 11 | .ui-tabs { 12 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 13 | padding: .2em; 14 | } 15 | .ui-tabs .ui-tabs-nav { 16 | margin: 0; 17 | padding: .2em .2em 0; 18 | } 19 | .ui-tabs .ui-tabs-nav li { 20 | list-style: none; 21 | float: left; 22 | position: relative; 23 | top: 0; 24 | margin: 1px .2em 0 0; 25 | border-bottom-width: 0; 26 | padding: 0; 27 | white-space: nowrap; 28 | } 29 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor { 30 | float: left; 31 | padding: .5em 1em; 32 | text-decoration: none; 33 | } 34 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { 35 | margin-bottom: -1px; 36 | padding-bottom: 1px; 37 | } 38 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, 39 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, 40 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { 41 | cursor: text; 42 | } 43 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { 44 | cursor: pointer; 45 | } 46 | .ui-tabs .ui-tabs-panel { 47 | display: block; 48 | border-width: 0; 49 | padding: 1em 1.4em; 50 | background: none; 51 | } 52 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Content/themes/base/tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tooltip/#theming 10 | */ 11 | .ui-tooltip { 12 | padding: 8px; 13 | position: absolute; 14 | z-index: 9999; 15 | max-width: 300px; 16 | -webkit-box-shadow: 0 0 5px #aaa; 17 | box-shadow: 0 0 5px #aaa; 18 | } 19 | body .ui-tooltip { 20 | border-width: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Controllers/RecommendationsController.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | using System.Web.Mvc; 5 | using PartsUnlimited.Models; 6 | using PartsUnlimited.Recommendations; 7 | using PartsUnlimited.Utils; 8 | 9 | namespace PartsUnlimited.Controllers 10 | { 11 | public class RecommendationsController : Controller 12 | { 13 | private readonly IPartsUnlimitedContext db; 14 | private readonly IRecommendationEngine recommendation; 15 | 16 | public RecommendationsController(IPartsUnlimitedContext context, IRecommendationEngine recommendationEngine) 17 | { 18 | db = context; 19 | recommendation = recommendationEngine; 20 | } 21 | 22 | public async Task GetRecommendations(string productId) 23 | { 24 | if (!ConfigurationHelpers.GetBool("ShowRecommendations")) 25 | { 26 | return new EmptyResult(); 27 | } 28 | 29 | var recommendedProductIds = await recommendation.GetRecommendationsAsync(productId); 30 | 31 | var recommendedProducts = await db.Products.Where(x => recommendedProductIds.Contains(x.ProductId.ToString())).ToListAsync(); 32 | 33 | return PartialView("_Recommendations", recommendedProducts); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Controllers/SearchController.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using System.Web.Mvc; 3 | using PartsUnlimited.ProductSearch; 4 | 5 | namespace PartsUnlimited.Controllers 6 | { 7 | public class SearchController : Controller 8 | { 9 | private readonly IProductSearch search; 10 | 11 | public SearchController(IProductSearch search) 12 | { 13 | this.search = search; 14 | } 15 | 16 | [HttpGet] 17 | public async Task Index(string q) 18 | { 19 | var result = await search.Search(q); 20 | 21 | return View(result); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Controllers/StoreController.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | using System; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Runtime.Caching; 6 | using System.Web.Mvc; 7 | using PartsUnlimited.Utils; 8 | using PartsUnlimited.ViewModels; 9 | 10 | namespace PartsUnlimited.Controllers 11 | { 12 | public class StoreController : Controller 13 | { 14 | private readonly IPartsUnlimitedContext db; 15 | 16 | public StoreController(IPartsUnlimitedContext context) 17 | { 18 | db = context; 19 | } 20 | 21 | // 22 | // GET: /Store/ 23 | public ActionResult Index() 24 | { 25 | var genres = db.Categories.ToList(); 26 | 27 | return View(genres); 28 | } 29 | 30 | // 31 | // GET: /Store/Browse?genre=Disco 32 | public ActionResult Browse(int categoryId) 33 | { 34 | // Retrieve Category genre and its Associated associated Products products from database 35 | var genreModel = db.Categories.Include("Products").Single(g => g.CategoryId == categoryId); 36 | 37 | return View(genreModel); 38 | } 39 | 40 | public ActionResult Details(int id) 41 | { 42 | 43 | var productCacheKey = string.Format("product_{0}", id); 44 | var product = MemoryCache.Default[productCacheKey] as Product; 45 | if (product == null) 46 | { 47 | product = db.Products.Single(a => a.ProductId == id); 48 | //Remove it from cache if not retrieved in last 10 minutes 49 | MemoryCache.Default.Add(productCacheKey, product, new CacheItemPolicy { SlidingExpiration = TimeSpan.FromMinutes(10) }); 50 | } 51 | var viewModel = new ProductViewModel 52 | { 53 | Product = product, 54 | ShowRecommendations = ConfigurationHelpers.GetBool("ShowRecommendations") 55 | }; 56 | 57 | return View(viewModel); 58 | } 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="PartsUnlimited.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Web; 4 | using System.Web.Http; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | using Microsoft.Practices.Unity; 9 | using PartsUnlimited.Utils; 10 | using Unity.Mvc4; 11 | 12 | namespace PartsUnlimited 13 | { 14 | public class Global : HttpApplication 15 | { 16 | internal static IUnityContainer UnityContainer; 17 | 18 | protected void Application_Start(object sender, EventArgs e) 19 | { 20 | AreaRegistration.RegisterAllAreas(); 21 | 22 | Database.SetInitializer(new PartsUnlimitedDbInitializer()); 23 | 24 | UnityContainer = UnityConfig.BuildContainer(); 25 | DependencyResolver.SetResolver(new UnityDependencyResolver(UnityContainer)); 26 | 27 | RouteConfig.RegisterRoutes(RouteTable.Routes); 28 | WebApiConfig.RegisterWebApi(GlobalConfiguration.Configuration, UnityContainer); 29 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 30 | BundleConfig.RegisterBundles(BundleTable.Bundles); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Hubs/AnnouncementHub.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.SignalR; 2 | using Microsoft.AspNet.SignalR.Hubs; 3 | 4 | namespace PartsUnlimited.Hubs 5 | { 6 | [HubName("Announcement")] 7 | public class AnnouncementHub : Hub 8 | { 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/admin_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/admin_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/admin_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/admin_mo_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/cart_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/cart_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/cart_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/cart_mo_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/community_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/community_1.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/community_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/community_2.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/community_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/community_3.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/community_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/community_4.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/deploy_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/deploy_button.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/facebook_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/facebook_icon.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/hero_image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/hero_image1.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/hero_image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/hero_image2.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/hero_image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/hero_image3.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/home_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/home_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/home_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/home_mo_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/login_profile_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/login_profile_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/login_safe_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/login_safe_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/mobile_search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/mobile_search_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_batteries_basic-battery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_batteries_basic-battery.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_batteries_jumper-leads.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_batteries_jumper-leads.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_batteries_premium-battery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_batteries_premium-battery.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_brakes_disc-calipers-red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_brakes_disc-calipers-red.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_brakes_disc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_brakes_disc.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_brakes_disk-pad-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_brakes_disk-pad-combo.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_lighting_bugeye-headlight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_lighting_bugeye-headlight.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_lighting_headlight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_lighting_headlight.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_lighting_lightbulb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_lighting_lightbulb.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_oil_filters.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_oil_filters.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_oil_oil-filter-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_oil_oil-filter-combo.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_oil_premium-oil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_oil_premium-oil.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_wheel_rim-blue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_wheel_rim-blue.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_wheel_rim-red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_wheel_rim-red.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_wheel_rim.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_wheel_rim.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_wheel_tyre-rim-chrome-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_wheel_tyre-rim-chrome-combo.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo-pack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo-pack.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/profile_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/profile_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/profile_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/profile_mo_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/remove_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/remove_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/search_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/search_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/search_mo_icon.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/shopnow_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/shopnow_button.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/social_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/social_placeholder.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/submenu_image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/submenu_image1.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/submenu_image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/submenu_image2.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/submenu_image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/submenu_image3.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/submenu_image4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/submenu_image4.jpg -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Images/unlimited_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Images/unlimited_logo.png -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/ApplicationUser.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity.EntityFramework; 2 | 3 | namespace PartsUnlimited.Models 4 | { 5 | public class ApplicationUser : IdentityUser 6 | { 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/CartItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace PartsUnlimited.Models 5 | { 6 | public class CartItem 7 | { 8 | [Key] 9 | public int CartItemId { get; set; } 10 | 11 | [Required] 12 | public string CartId { get; set; } 13 | public int ProductId { get; set; } 14 | public int Count { get; set; } 15 | 16 | [DataType(DataType.DateTime)] 17 | public DateTime DateCreated { get; set; } 18 | 19 | public virtual Product Product { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/Category.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace PartsUnlimited.Models 5 | { 6 | public class Category 7 | { 8 | public int CategoryId { get; set; } 9 | 10 | [Required] 11 | public string Name { get; set; } 12 | 13 | public string Description { get; set; } 14 | 15 | public string ImageUrl { get; set; } 16 | 17 | public List Products { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/CommunityPost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PartsUnlimited.Models 4 | { 5 | 6 | public class CommunityPost 7 | { 8 | public string Image { get; set; } 9 | public string Content { get; set; } 10 | public DateTime DatePosted { get; set; } 11 | public CommunitySource Source { get; set; } 12 | } 13 | 14 | public enum CommunitySource 15 | { 16 | Facebook, 17 | Twitter 18 | } 19 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/IPartsUnlimitedContext.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | using System; 4 | using System.Data.Entity; 5 | using System.Data.Entity.Infrastructure; 6 | 7 | namespace PartsUnlimited.Models 8 | { 9 | public interface IPartsUnlimitedContext : IDisposable 10 | { 11 | IDbSet CartItems { get; } 12 | IDbSet Categories { get; } 13 | IDbSet OrderDetails { get; } 14 | IDbSet Orders { get; } 15 | IDbSet Products { get; } 16 | IDbSet Users { get; } 17 | IDbSet RainChecks { get; } 18 | IDbSet Stores { get; } 19 | 20 | Task SaveChangesAsync(CancellationToken requestAborted); 21 | DbEntityEntry Entry(object entity); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/Manufacturer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace PartsUnlimited.Models 4 | { 5 | public class Manufacturer 6 | { 7 | public int ManufacturerId { get; set; } 8 | 9 | [Required] 10 | public string Name { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Web.ModelBinding; 4 | 5 | namespace PartsUnlimited.Models 6 | { 7 | //[Bind(Include = "FirstName,LastName,Address,City,State,PostalCode,Country,Phone,Email")] 8 | public class Order 9 | { 10 | [BindNever] 11 | [ScaffoldColumn(false)] 12 | public int OrderId { get; set; } 13 | 14 | [BindNever] 15 | [ScaffoldColumn(false)] 16 | public System.DateTime OrderDate { get; set; } 17 | 18 | [BindNever] 19 | [Required] 20 | [ScaffoldColumn(false)] 21 | public string Username { get; set; } 22 | 23 | [Required] 24 | [Display(Name = "Name")] 25 | [StringLength(160)] 26 | public string Name { get; set; } 27 | 28 | [Required] 29 | [StringLength(70, MinimumLength = 3)] 30 | public string Address { get; set; } 31 | 32 | [Required] 33 | [StringLength(40)] 34 | public string City { get; set; } 35 | 36 | [Required] 37 | [StringLength(40)] 38 | public string State { get; set; } 39 | 40 | [Required] 41 | [Display(Name = "Postal Code")] 42 | [StringLength(10, MinimumLength = 5)] 43 | public string PostalCode { get; set; } 44 | 45 | [Required] 46 | [StringLength(40)] 47 | public string Country { get; set; } 48 | 49 | [Required] 50 | [StringLength(24)] 51 | [DataType(DataType.PhoneNumber)] 52 | public string Phone { get; set; } 53 | 54 | [Required] 55 | [Display(Name = "Email Address")] 56 | [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}", 57 | ErrorMessage = "Email is is not valid.")] 58 | [DataType(DataType.EmailAddress)] 59 | public string Email { get; set; } 60 | 61 | [BindNever] 62 | [ScaffoldColumn(false)] 63 | public decimal Total { get; set; } 64 | 65 | [BindNever] 66 | public List OrderDetails { get; set; } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/OrderCostSummary.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Models 2 | { 3 | public class OrderCostSummary 4 | { 5 | public string CartSubTotal { get; set; } 6 | public string CartShipping { get; set; } 7 | public string CartTax { get; set; } 8 | public string CartTotal { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/OrderDetail.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Models 2 | { 3 | public class OrderDetail 4 | { 5 | public int OrderDetailId { get; set; } 6 | 7 | public int OrderId { get; set; } 8 | 9 | public int ProductId { get; set; } 10 | 11 | public int Quantity { get; set; } 12 | 13 | public decimal UnitPrice { get; set; } 14 | 15 | public virtual Product Product { get; set; } 16 | 17 | public virtual Order Order { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/PartsUnlimitedContext.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | 4 | namespace PartsUnlimited.Models 5 | { 6 | public class PartsUnlimitedContext : IdentityDbContext, IPartsUnlimitedContext 7 | { 8 | public PartsUnlimitedContext() 9 | : base("name=DefaultConnectionString") 10 | { 11 | } 12 | 13 | public IDbSet Products { get; set; } 14 | public IDbSet Orders { get; set; } 15 | public IDbSet Categories { get; set; } 16 | public IDbSet CartItems { get; set; } 17 | public IDbSet OrderDetails { get; set; } 18 | public IDbSet RainChecks { get; set; } 19 | public IDbSet Stores { get; set; } 20 | 21 | protected override void OnModelCreating(DbModelBuilder builder) 22 | { 23 | builder.Entity().HasKey(a => a.ProductId); 24 | builder.Entity().HasKey(o => o.OrderId); 25 | builder.Entity().HasKey(g => g.CategoryId); 26 | builder.Entity().HasKey(c => c.CartItemId); 27 | builder.Entity().HasKey(o => o.OrderDetailId); 28 | builder.Entity().HasKey(o => o.RaincheckId); 29 | builder.Entity().HasKey(o => o.StoreId); 30 | 31 | base.OnModelCreating(builder); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Web.ModelBinding; 5 | using Newtonsoft.Json; 6 | 7 | namespace PartsUnlimited.Models 8 | { 9 | public class Product 10 | { 11 | [ScaffoldColumn(false)] 12 | public int ProductId { get; set; } 13 | 14 | [Required] 15 | [Display(Name = "Sku Number")] 16 | public string SkuNumber { get; set; } 17 | 18 | [Display(Name = "Category")] 19 | public int CategoryId { get; set; } 20 | 21 | public int RecommendationId { get; set; } 22 | 23 | [Required] 24 | [StringLength(160, MinimumLength = 2)] 25 | public string Title { get; set; } 26 | 27 | [Required] 28 | [Range(0.01, 500.00)] 29 | [DataType(DataType.Currency)] 30 | public decimal Price { get; set; } 31 | 32 | [Range(0.01, 500.00)] 33 | [DataType(DataType.Currency)] 34 | public decimal SalePrice { get; set; } 35 | 36 | [Display(Name = "Product Art URL")] 37 | [StringLength(1024)] 38 | public string ProductArtUrl { get; set; } 39 | 40 | [Required] 41 | public string Description { get; set; } 42 | 43 | public virtual Category Category { get; set; } 44 | 45 | public virtual List OrderDetails { get; set; } 46 | 47 | [ScaffoldColumn(false)] 48 | [BindNever] 49 | [Required] 50 | public DateTime Created { get; set; } 51 | 52 | [Required] 53 | [Display(Name = "Product Details")] 54 | public string ProductDetails { get; set; } 55 | 56 | public int Inventory { get; set; } 57 | 58 | public int LeadTime { get; set; } 59 | 60 | public Dictionary ProductDetailList 61 | { 62 | get 63 | { 64 | if (string.IsNullOrWhiteSpace(ProductDetails)) 65 | { 66 | return new Dictionary(); 67 | } 68 | return JsonConvert.DeserializeObject>(ProductDetails); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/Raincheck.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Models 2 | { 3 | public class Raincheck 4 | { 5 | public int RaincheckId { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public int ProductId { get; set; } 10 | 11 | public virtual Product Product { get; set; } 12 | 13 | public int Quantity { get; set; } 14 | 15 | public double SalePrice { get; set; } 16 | 17 | public int StoreId { get; set; } 18 | 19 | public virtual Store IssuerStore { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/Store.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/Models/Store.cs -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Models/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "dependencies": { 4 | "System.Runtime": "4.0.20-beta-22523", 5 | "Microsoft.AspNet.Mvc": "6.0.0-beta3", 6 | "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta3", 7 | "EntityFramework.SqlServer": "7.0.0-beta3", 8 | "EntityFramework.Commands": "7.0.0-beta3", 9 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta3", 10 | "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta3", 11 | "Microsoft.Framework.OptionsModel": "1.0.0-beta3" 12 | }, 13 | "commands": { 14 | "ef": "EntityFramework.Commands" 15 | }, 16 | "frameworks": { 17 | "aspnet50": { 18 | "dependencies": { 19 | "System.Runtime": "4.0.20-beta-22523" 20 | } 21 | }, 22 | "aspnetcore50": { 23 | "dependencies": { 24 | "System.Runtime": "4.0.20-beta-22523" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ProductSearch/IProductSearch.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using PartsUnlimited.Models; 4 | 5 | namespace PartsUnlimited.ProductSearch 6 | { 7 | public interface IProductSearch 8 | { 9 | Task> Search(string query); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ProductSearch/StringContainsProductSearch.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Data.Entity; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using PartsUnlimited.Models; 6 | 7 | namespace PartsUnlimited.ProductSearch 8 | { 9 | public class StringContainsProductSearch : IProductSearch 10 | { 11 | private readonly IPartsUnlimitedContext _context; 12 | 13 | public StringContainsProductSearch(IPartsUnlimitedContext context) 14 | { 15 | _context = context; 16 | } 17 | 18 | public async Task> Search(string query) 19 | { 20 | var lowercase_query = query.ToLower(); 21 | 22 | var q = _context.Products 23 | .Where(p => p.Title.ToLower().Contains(lowercase_query)); 24 | 25 | return await q.ToListAsync(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("PartsUnlimitedWebsite")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("PartsUnlimitedWebsite")] 12 | [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("f7da50b9-8680-4e08-8d3e-953354deb0bc")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Revision and Build Numbers 32 | // by using the '*' as shown below: 33 | [assembly: AssemblyVersion("1.0.0.0")] 34 | [assembly: AssemblyFileVersion("1.0.0.0")] 35 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Recommendations/IRecommendationEngine.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace PartsUnlimited.Recommendations 5 | { 6 | public interface IRecommendationEngine 7 | { 8 | Task> GetRecommendationsAsync(string productId); 9 | } 10 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Recommendations/NaiveRecommendationEngine.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace PartsUnlimited.Recommendations 5 | { 6 | public class NaiveRecommendationEngine : IRecommendationEngine 7 | { 8 | public Task> GetRecommendationsAsync(string productId) 9 | { 10 | return Task.FromResult>(new[] { productId }); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Scripts/AppInsights.js: -------------------------------------------------------------------------------- 1 | var appInsights = window.appInsights || function (config) { 2 | function s(config) { 3 | t[config] = function () { 4 | var i = arguments; 5 | t.queue.push(function () { 6 | t[config].apply(t, i) 7 | }) 8 | } 9 | } 10 | 11 | var t = { 12 | config: config 13 | }, 14 | r = document, 15 | f = window, 16 | e = "script", 17 | o = r.createElement(e), 18 | i, u; 19 | 20 | for (o.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", r.getElementsByTagName(e)[0].parentNode.appendChild(o), t.cookie = r.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) { 21 | s("track" + i.pop()); 22 | } 23 | 24 | return config.disableExceptionTracking || (i = "onerror", s("_" + i), u = f[i], f[i] = function (config, r, f, e, o) { 25 | var s = u && u(config, r, f, e, o); 26 | return s !== !0 && t["_" + i](config, r, f, e, o), s 27 | }), t 28 | }({ 29 | instrumentationKey: ApplicationInsightsInstrumentationKey 30 | }); 31 | 32 | window.appInsights = appInsights; 33 | appInsights.trackPageView(); -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Scripts/NewStoreArrivals.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $.connection.hub.logging = true; 3 | var announcementsHub = $.connection.Announcement; 4 | 5 | announcementsHub.client.announcement = function (item) { 6 | var newArrivals = $('a#NewArrivalsPanel'); 7 | newArrivals.attr("href", item.Url); //Set the URL 8 | newArrivals.text(item.Title); //Set the title 9 | }; 10 | 11 | $.connection.hub.start().done(function () { 12 | console.log('hub connection open'); 13 | }); 14 | }); -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Scripts/Recommendations.js: -------------------------------------------------------------------------------- 1 | function getRecommendations(productId) { 2 | $.ajax({ 3 | url: "/Recommendations/GetRecommendations", 4 | type: "GET", 5 | data: { productId: productId }, 6 | success: function (data) { 7 | $("#recommendations-panel").html(data); 8 | }, 9 | error: function (error) { 10 | alert("Failed to get recommendations..."); 11 | }, 12 | }) 13 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Scripts/UI-Initialization.js: -------------------------------------------------------------------------------- 1 | // Initialize any jquery-ui-datepicker elements 2 | $(function () { 3 | $(".jquery-ui-datepicker").datepicker(); 4 | }); -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Scripts/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Security/ConfigurationLoginProviderCredentials.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Utils; 2 | 3 | namespace PartsUnlimited.Security 4 | { 5 | public class ConfigurationLoginProviderCredentials : ILoginProviderCredentials 6 | { 7 | public ConfigurationLoginProviderCredentials(string providerName) 8 | { 9 | Key = ConfigurationHelpers.GetString(string.Format("Authentication.{0}.Key", providerName)); 10 | Secret = ConfigurationHelpers.GetString(string.Format("Authentication.{0}.Secret", providerName)); 11 | 12 | Use = !string.IsNullOrWhiteSpace(Key) && !string.IsNullOrWhiteSpace(Secret); 13 | } 14 | 15 | public string Key { get; set; } 16 | public string Secret { get; set; } 17 | public bool Use { get; protected set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Security/ConfigurationLoginProviders.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Security 2 | { 3 | public class ConfigurationLoginProviders : ILoginProviders 4 | { 5 | public ConfigurationLoginProviders() 6 | { 7 | Facebook = GetProvider("Facebook"); 8 | Google = GetProvider("Google"); 9 | Microsoft = GetProvider("Microsoft"); 10 | Twitter = GetProvider("Twitter"); 11 | } 12 | 13 | private ILoginProviderCredentials GetProvider(string providerName) 14 | { 15 | return new ConfigurationLoginProviderCredentials(providerName); 16 | } 17 | 18 | public ILoginProviderCredentials Facebook { get; private set; } 19 | public ILoginProviderCredentials Google { get; private set; } 20 | public ILoginProviderCredentials Microsoft { get; private set; } 21 | public ILoginProviderCredentials Twitter { get; private set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Security/ILoginProviderCredentials.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Security 2 | { 3 | public interface ILoginProviderCredentials 4 | { 5 | string Key { get; } 6 | string Secret { get; } 7 | bool Use { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Security/ILoginProviders.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Security 2 | { 3 | public interface ILoginProviders 4 | { 5 | ILoginProviderCredentials Facebook { get; } 6 | ILoginProviderCredentials Google { get; } 7 | ILoginProviderCredentials Microsoft { get; } 8 | ILoginProviderCredentials Twitter { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.ApplicationInsights.Extensibility; 2 | using Microsoft.Owin; 3 | using Owin; 4 | using PartsUnlimited; 5 | using System.Web.Configuration; 6 | 7 | [assembly: OwinStartup(typeof(Startup))] 8 | 9 | namespace PartsUnlimited 10 | { 11 | public partial class Startup 12 | { 13 | public void Configuration(IAppBuilder app) 14 | { 15 | ConfigureAuth(app); 16 | 17 | TelemetryConfiguration.Active.InstrumentationKey = WebConfigurationManager.AppSettings["Keys:ApplicationInsights:InstrumentationKey"]; 18 | 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/EmptyTelemetryProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace PartsUnlimited.Utils 5 | { 6 | public class EmptyTelemetryProvider : ITelemetryProvider 7 | { 8 | public void TrackEvent(string message) 9 | { 10 | } 11 | 12 | public void TrackEvent(string message, Dictionary properties, Dictionary measurements) 13 | { 14 | } 15 | 16 | public void TrackException(Exception exception) 17 | { 18 | } 19 | 20 | public void TrackTrace(string message) 21 | { 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/HtmlHelperExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | 5 | namespace PartsUnlimited.Utils 6 | { 7 | public static class HtmlHelperExtensions 8 | { 9 | public static HtmlString Image(this HtmlHelper helper, string src, string alt = null) 10 | { 11 | if (string.IsNullOrWhiteSpace(src)) 12 | { 13 | throw new ArgumentOutOfRangeException("src", src, "Must not be null or whitespace"); 14 | } 15 | 16 | var img = new TagBuilder("img"); 17 | 18 | img.MergeAttribute("src", GetCdnSource(src)); 19 | 20 | if (!string.IsNullOrWhiteSpace(alt)) 21 | { 22 | img.MergeAttribute("alt", alt); 23 | } 24 | 25 | return new HtmlString(img.ToString(TagRenderMode.SelfClosing)); 26 | } 27 | 28 | private static string GetCdnSource(string src) 29 | { 30 | return string.Format("{0}/{1}", ConfigurationHelpers.GetString("ImagePath"), src); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/HttpClientWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Net.Http.Headers; 4 | using System.Text; 5 | 6 | namespace PartsUnlimited.Utils 7 | { 8 | public class HttpClientWrapper : HttpClient, IHttpClient 9 | { 10 | public HttpClientWrapper() 11 | { 12 | var accountKey = Encoding.ASCII.GetBytes(ConfigurationHelpers.GetString("MachineLearning.AccountKey")); 13 | var header = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(accountKey)); 14 | DefaultRequestHeaders.Authorization = header; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/IHttpClient.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace PartsUnlimited.Utils 4 | { 5 | public interface IHttpClient 6 | { 7 | Task GetStringAsync(string uri); 8 | } 9 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/IOrdersQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using PartsUnlimited.Models; 4 | using PartsUnlimited.ViewModels; 5 | 6 | namespace PartsUnlimited.Utils 7 | { 8 | public interface IOrdersQuery 9 | { 10 | Task FindOrderAsync(int id); 11 | Task IndexHelperAsync(string username, DateTime? start, DateTime? end, string invalidOrderSearch, bool isAdminSearch); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/IRaincheckQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using PartsUnlimited.Models; 4 | 5 | namespace PartsUnlimited.Utils 6 | { 7 | public interface IRaincheckQuery 8 | { 9 | Task AddAsync(Raincheck raincheck); 10 | Task FindAsync(int id); 11 | Task> GetAllAsync(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/ITelemetryProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace PartsUnlimited.Utils 5 | { 6 | public interface ITelemetryProvider 7 | { 8 | void TrackTrace(string message); 9 | void TrackEvent(string message); 10 | void TrackEvent(string message, Dictionary properties, Dictionary measurements); 11 | void TrackException(Exception exception); 12 | } 13 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/LayoutDataAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Runtime.Caching; 4 | using System.Web.Mvc; 5 | using PartsUnlimited.Models; 6 | 7 | namespace PartsUnlimited.Utils 8 | { 9 | public class LayoutDataAttribute : ActionFilterAttribute 10 | { 11 | public override void OnActionExecuted(ActionExecutedContext filterContext) 12 | { 13 | var dataContext = DependencyResolver.Current.GetService(); 14 | 15 | var cart = ShoppingCart.GetCart(dataContext, filterContext.HttpContext); 16 | var summary = cart.GetCartItems() 17 | .Select(a => a.Product.Title) 18 | .OrderBy(x => x) 19 | .ToList(); 20 | 21 | var latestProduct = MemoryCache.Default["latestProduct"] as Product; 22 | if (latestProduct == null) 23 | { 24 | latestProduct = dataContext.Products.OrderByDescending(a => a.Created).FirstOrDefault(); 25 | if (latestProduct != null) 26 | { 27 | MemoryCache.Default.Add("latestProduct", latestProduct, DateTimeOffset.Now.AddMinutes(10)); 28 | } 29 | } 30 | 31 | filterContext.Controller.ViewBag.Categories = dataContext.Categories.ToList(); 32 | filterContext.Controller.ViewBag.CartSummary = summary; 33 | filterContext.Controller.ViewBag.Product = latestProduct; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/PartsUnlimitedTelemetryInitializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.ApplicationInsights.Channel; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace PartsUnlimited.Utils 8 | { 9 | public class PartsUnlimitedTelemetryInitializer 10 | { 11 | string appVersion = GetApplicationVersion(); 12 | 13 | private static string GetApplicationVersion() 14 | { 15 | return typeof(PartsUnlimitedTelemetryInitializer).Assembly.GetName().Version.ToString(); 16 | } 17 | 18 | public void Initialize(ITelemetry telemetry) 19 | { 20 | telemetry.Context.Component.Version = appVersion; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/SignalRDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Microsoft.AspNet.SignalR; 5 | using Microsoft.Practices.Unity; 6 | 7 | namespace PartsUnlimited.Utils 8 | { 9 | public class SignalRDependencyResolver : DefaultDependencyResolver 10 | { 11 | private readonly IUnityContainer inner = Global.UnityContainer.CreateChildContainer(); 12 | 13 | public override object GetService(Type serviceType) 14 | { 15 | try 16 | { 17 | return inner.Resolve(serviceType); 18 | } 19 | catch (ResolutionFailedException) 20 | { 21 | return base.GetService(serviceType); 22 | } 23 | } 24 | 25 | public override IEnumerable GetServices(Type serviceType) 26 | { 27 | return inner.ResolveAll(serviceType).Concat(base.GetServices(serviceType)); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Utils/TelemetryProvider.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.ApplicationInsights; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace PartsUnlimited.Utils 6 | { 7 | public class TelemetryProvider : ITelemetryProvider 8 | { 9 | public TelemetryClient AppInsights { get; set; } 10 | 11 | public TelemetryProvider() 12 | { 13 | AppInsights = new TelemetryClient(); 14 | } 15 | 16 | public void TrackEvent(string message) 17 | { 18 | AppInsights.TrackEvent(message); 19 | } 20 | 21 | public void TrackEvent(string message, Dictionary properties, Dictionary measurements) 22 | { 23 | AppInsights.TrackEvent(message, properties, measurements); 24 | } 25 | 26 | public void TrackTrace(string message) 27 | { 28 | AppInsights.TrackTrace(message); 29 | } 30 | 31 | public void TrackException (Exception exception) 32 | { 33 | AppInsights.TrackException(exception); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/AlbumData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PartsUnlimited.ViewModels 4 | { 5 | public class ProductData 6 | { 7 | public string Title { get; set; } 8 | 9 | public string Url { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/EditProductViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Mvc; 3 | using PartsUnlimited.Models; 4 | 5 | namespace PartsUnlimited.ViewModels 6 | { 7 | public class EditProductViewModel 8 | { 9 | public Product Product { get; set; } 10 | public IEnumerable Categories { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/HomeViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using PartsUnlimited.Models; 3 | 4 | namespace PartsUnlimited.ViewModels 5 | { 6 | public class HomeViewModel 7 | { 8 | public List NewProducts { get; set; } 9 | public List TopSellingProducts { get; set; } 10 | public List CommunityPosts { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/OrderDetailsViewModel.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | 3 | namespace PartsUnlimited.ViewModels 4 | { 5 | public class OrderDetailsViewModel 6 | { 7 | public OrderCostSummary OrderCostSummary { get; set; } 8 | public Order Order { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/OrdersModel.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace PartsUnlimited.ViewModels 6 | { 7 | public class OrdersModel 8 | { 9 | public bool IsAdminSearch { get; private set; } 10 | public string InvalidOrderSearch { get; private set; } 11 | public IEnumerable Orders { get; private set; } 12 | public string Username { get; private set; } 13 | public DateTimeOffset StartDate { get; private set; } 14 | public DateTimeOffset EndDate { get; private set; } 15 | 16 | public OrdersModel(IEnumerable orders, string username, DateTimeOffset startDate, DateTimeOffset endDate, string invalidOrderSearch, bool isAdminSearch) 17 | { 18 | Orders = orders; 19 | Username = username; 20 | StartDate = startDate; 21 | EndDate = endDate; 22 | InvalidOrderSearch = invalidOrderSearch; 23 | IsAdminSearch = isAdminSearch; 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/ProductViewModel.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | 3 | namespace PartsUnlimited.ViewModels 4 | { 5 | public class ProductViewModel 6 | { 7 | public Product Product { get; set; } 8 | public bool ShowRecommendations { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/ShoppingCartRemoveViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.ViewModels 2 | { 3 | public class ShoppingCartRemoveViewModel 4 | { 5 | public string Message { get; set; } 6 | public string CartSubTotal { get; set; } 7 | public string CartShipping { get; set; } 8 | public string CartTax { get; set; } 9 | public string CartTotal { get; set; } 10 | public int CartCount { get; set; } 11 | public int ItemCount { get; set; } 12 | public int DeleteId { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/ViewModels/ShoppingCartViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using PartsUnlimited.Models; 3 | 4 | namespace PartsUnlimited.ViewModels 5 | { 6 | public class ShoppingCartViewModel 7 | { 8 | public List CartItems { get; set; } 9 | public int CartCount { get; set; } 10 | public OrderCostSummary OrderCostSummary { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 |
5 |

@ViewBag.Title

6 |
7 |
8 |
9 |

10 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

12 |
13 |
14 |
15 |
16 |
-------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title

7 |
8 |
9 |

Unsuccessful login with service.

10 |
11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Utils 2 | @model PartsUnlimited.Models.ForgotPasswordViewModel 3 | @{ 4 | ViewBag.Title = "Forgot your password?"; 5 | } 6 | 7 |
8 |

@ViewBag.Title

9 |
10 |
11 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 12 | { 13 | @Html.AntiForgeryToken() 14 |

Enter your email.

15 | @Html.ValidationSummary("", new { @class = "text-danger" }) 16 |
17 |
18 |
19 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control", placeholder = "Email Address" }) 20 | @Html.Image("login_profile_icon.png") 21 |
22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 | } 30 |
31 |
32 |
33 |
34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/jquery.validate") 37 | } 38 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title

7 |
8 |
9 |
10 |

11 | Please check your email to reset your password. 12 |

13 |

14 | For demo purpose only: @Html.ActionLink("Click here to reset the password", "ResetPassword", new { code = ViewBag.Code }) 15 |

16 |
17 |
18 |
19 |
20 |
-------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/RegisterConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Register Confirmation"; 3 | } 4 |
5 |

@ViewBag.Title

6 |
7 |
8 |
9 |

10 | Please check your email to activate your account. 11 |

12 |

13 | Demo/testing purposes only: The sample displays the code and user id in the page: @Html.ActionLink("Click here to confirm your email: ", "ConfirmEmail", new { code = ViewBag.Code, userId = ViewBag.UserId }) 14 |

15 |
16 |
17 |
18 |
19 |
-------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title

7 |
8 |
9 |
10 |

11 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 12 |

13 |
14 |
15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 |
6 |

@ViewBag.Title

7 |
8 |
9 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 10 | { 11 | @Html.AntiForgeryToken() 12 | @Html.Hidden("rememberMe", @Model.RememberMe) 13 |

Send verification code

14 |
15 | 16 |
17 | 18 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers, new { @class = "form-control"}) 19 |
20 | 21 |
22 | 23 |
24 |
25 | } 26 |
27 |
28 |
29 |
30 | @section Scripts { 31 | @Scripts.Render("~/bundles/jquery.validate") 32 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Utils 2 | @model PartsUnlimited.Models.VerifyCodeViewModel 3 | @{ 4 | ViewBag.Title = "Verify"; 5 | } 6 | 7 |
8 |

@ViewBag.Title

9 |
10 |
11 | @using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 12 | { 13 | @Html.AntiForgeryToken() 14 | @Html.Hidden("provider", @Model.Provider) 15 | @Html.Hidden("rememberMe", @Model.RememberMe) 16 |

Enter verification code

17 |

18 | @ViewBag.Status 19 |
20 | Please change this code to register an SMS/Email service in IdentityConfig to send a message. 21 |

22 | @Html.ValidationSummary("", new { @class = "text-danger" }) 23 |
24 |
25 |
26 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control", placeholder = "Code" }) 27 | @Html.Image("login_safe_icon.png") 28 |
29 |
30 |
31 |
32 |
33 |
34 | @Html.CheckBoxFor(m => m.RememberBrowser) 35 | @Html.LabelFor(m => m.RememberBrowser) 36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 | } 45 |
46 |
47 |
48 |
49 | @section Scripts { 50 | @Scripts.Render("~/bundles/jquery.validate") 51 | } 52 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.Owin.Security 2 | @model PartsUnlimited.Models.ExternalLoginListViewModel 3 | 4 | @{ 5 | var loginProviders = Model.AuthenticationManager.GetExternalAuthenticationTypes(); 6 | } 7 | 8 |

Use another service to log in

9 | @if (loginProviders.Any()) 10 | { 11 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) 12 | { 13 | @Html.AntiForgeryToken() 14 |
15 | @foreach (AuthenticationDescription p in loginProviders.Where(a => a.Caption != null)) 16 | { 17 |
18 | 19 |
20 | } 21 |
22 | } 23 | } 24 | else 25 | { 26 |
27 |

28 | There are no external authentication services configured. See this article 29 | for details on setting up this ASP.NET application to support logging in via external services. 30 |

31 |
32 | } 33 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Checkout/Complete.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Order 2 | 3 | @{ 4 | ViewBag.Title = "Checkout Complete"; 5 | } 6 |
7 |

Checkout Complete

8 | 9 |
10 |
11 |

Thanks for your order!

12 |

Your order number is: @Model.OrderId

13 |

Order Date: @Model.OrderDate.ToShortDateString()

14 |

15 | You can @Html.ActionLink("view your order", "Details", "Orders", new{ id = @Model.OrderId}, new{ @class="action-link"}) from your account page. 16 |

17 |
18 |

19 | @Html.ActionLink("Keep Shopping", "Index", "Home", null, new{ @class="btn"}) 20 |

21 | 22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Home/Recomendations.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PartsUnlimited.Utils 3 | @{ 4 | ViewBag.Title = "Home Page"; 5 | } 6 |
7 |

Parts Unlimited Online Store Recommenations

8 | Your Recommentations 9 |

Your recomendations are:

10 | Brembo Brakes 11 | Tires 12 |
13 | 14 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Utils 2 | @model PartsUnlimited.Models.AddPhoneNumberViewModel 3 | @{ 4 | ViewBag.Title = "Phone Number"; 5 | } 6 | 7 |
8 |

@ViewBag.Title

9 |
10 |
11 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 12 | { 13 | @Html.AntiForgeryToken() 14 |

Add a phone number

15 | @Html.ValidationSummary("", new { @class = "text-danger" }) 16 |
17 |
18 |
19 | @Html.TextBoxFor(m => m.Number, new { @class = "form-control", placeholder = "Phone Number" }) 20 | @Html.Image("login_profile_icon.png") 21 |
22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 | } 30 |
31 |
32 |
33 |
34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/jquery.validate") 37 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Utils 2 | @model PartsUnlimited.Models.SetPasswordViewModel 3 | @{ 4 | ViewBag.Title = "Create Password"; 5 | } 6 | 7 |
8 |

@ViewBag.Title

9 |
10 |
11 |

12 | You do not have a local username/password for this site. Add a local 13 | account so you can log in without an external login. 14 |

15 | 16 | @using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 17 | { 18 | @Html.AntiForgeryToken() 19 | 20 |

Create Local Login

21 | 22 | @Html.ValidationSummary("", new { @class = "text-danger" }) 23 |
24 |
25 |
26 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control", placeholder = "Password" }) 27 | @Html.Image("login_safe_icon.png") 28 |
29 |
30 |
31 |
32 |
33 |
34 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control", placeholder = "Confirm Password" }) 35 | @Html.Image("login_safe_icon.png") 36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 | } 45 |
46 |
47 |
48 |
49 | 50 | @section Scripts { 51 | @Scripts.Render("~/bundles/jquery.validate") 52 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Utils 2 | @model PartsUnlimited.Models.VerifyPhoneNumberViewModel 3 | @{ 4 | ViewBag.Title = "Verify Phone Number"; 5 | } 6 | 7 |
8 |

@ViewBag.Title.

9 | 10 |
11 |
12 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 13 | { 14 | @Html.AntiForgeryToken() 15 | @Html.Hidden("phoneNumber", @Model.PhoneNumber) 16 |

Enter verification code

17 |

18 | @ViewBag.Status 19 |
20 | Please change this code to register an SMS service in IdentityConfig to send a text message. 21 |

22 | @Html.ValidationSummary("", new { @class = "text-danger" }) 23 |
24 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 25 |
26 |
27 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control", placeholder = "Code" }) 28 | @Html.Image("login_safe_icon.png") 29 |
30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | } 38 |
39 |
40 |
41 |
42 | @section Scripts { 43 | @Scripts.Render("~/bundles/jquery.validate") 44 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Orders/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrderDetailsViewModel 2 | @{ 3 | if (Model == null) 4 | { 5 | ViewBag.Title = "Unknown order"; 6 | } 7 | else 8 | { 9 | ViewBag.Title = string.Format("Order history for {0}", Model.Order.OrderId); 10 | } 11 | } 12 | 13 | @Html.Partial("_Order", Model) 14 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Orders/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrdersModel 2 | 3 | @{ 4 | ViewBag.Title = "Order History"; 5 | } 6 | 7 | @Html.Partial("_OrdersSearch", Model) -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Search/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 |
4 |

Search results

5 | 6 | @Html.Partial("_ProductList", Model) 7 | <<<<<<< HEAD 8 |
9 | ======= 10 | 11 | >>>>>>> intergen-vcurrent 12 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/DemoLinkDisplay.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Demo link display page - Not for production use"; 3 | } 4 | 5 |
6 |

@ViewBag.Title

7 |
8 |
9 |
10 |

11 | Demo link display page - Not for production use. 12 |

13 | 14 | @if (ViewBag.Link != null) 15 | { 16 |

17 | For DEMO only: You can click this link to confirm the email: [[link]] 18 |
19 | Please change this code to register an email service in IdentityConfig to send an email. 20 |

21 | } 22 |
23 |
24 |
25 |
26 |
-------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Error"; 3 | } 4 |
5 |

Error

6 |
7 |
8 |

An error occurred while processing your request.

9 |
10 |
11 |
12 |
-------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Locked Out"; 3 | } 4 |
5 |

Locked out

6 |
7 |
8 |

This account has been locked out, please try again later.

9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_AdminMenu.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Areas.Admin 2 | 3 | @{ 4 | var claims = User.Identity as System.Security.Claims.ClaimsIdentity; 5 | var isAdmin = claims.HasClaim(AdminConstants.ManageStore.Name, AdminConstants.ManageStore.Allowed); 6 | } 7 | 8 | @if (isAdmin) 9 | { 10 | 19 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_Announcement.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Product 2 | 3 | 18 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_CartSummary.cshtml: -------------------------------------------------------------------------------- 1 | 
  • 2 | 3 | 4 |
    Cart
    5 | @if (ViewBag.CartCount > 0) 6 | { 7 | 8 | } 9 |
    10 |
  • -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_CategoryMenu.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @foreach (var genre in Model) 3 | { 4 |
  • @Html.ActionLink(genre.Name, "Browse", "Store", new { CategoryId = genre.CategoryId, Area = string.Empty }, null)
  • 5 | } 6 |
  • @Html.ActionLink("More", "Index", "Store", new {Area = string.Empty }, null)
  • -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_CommunityList.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Models 2 | @model IEnumerable 3 | 4 |
    5 | @foreach (var post in Model) 6 | { 7 |
    8 |
    9 | 27 |
    28 |
    29 |
    30 | @if (@post.Source == CommunitySource.Facebook) 31 | { 32 | 33 | } 34 |
    35 |

    @post.Content

    36 |
    37 |

    @post.Source.ToString(), @post.DatePosted.ToString("dd MMMM yyyy")

    38 |
    39 |
    40 |
    41 |
    42 | 43 |
    44 |
    45 | } 46 |
    -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_Login.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @if (User.Identity.IsAuthenticated) 3 | { 4 | var isNtlm = User.Identity.AuthenticationType == "NTLM"; 5 | 6 | 24 | } 25 | else 26 | { 27 |
  • @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "login-link", @class = "head-link" })
  • 28 | } 29 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_OrderCostSummary.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.OrderCostSummary 2 | 3 | 4 |
    5 |
    6 |
    7 |
    8 |
    Sub Total
    9 |
    @Model.CartSubTotal
    10 |
    11 |
    12 |
    Shipping
    13 |
    @Model.CartShipping
    14 |
    15 |
    16 |
    Tax
    17 |
    @Model.CartTax
    18 |
    19 |
    20 |
    21 |
    22 |
    Total
    23 |
    @Model.CartTotal
    24 |
    25 |
    26 |
    27 |
    28 |
    29 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_ProductList.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 43 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Shared/_Recommendations.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @if (Model.Any()) 4 | { 5 |

    You may also consider

    6 | @Html.Partial("_ProductList", Model) 7 | } 8 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Store/Browse.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Category 2 | @{ 3 | ViewBag.Title = "Browse Products"; 4 | } 5 | 6 |
    7 |

    @Model.Name

    8 | @Html.Partial("_ProductList", Model.Products) 9 |
    10 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Store/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Utils 2 | @model IEnumerable 3 | 4 | @{ 5 | ViewBag.Title = "Store"; 6 | } 7 |
    8 |

    Browse Categories

    9 | 37 |
    38 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
    6 |
    7 | 8 | 9 | 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 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/api/ProductsController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Data.Entity; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Threading.Tasks; 6 | using System.Web.Http; 7 | using PartsUnlimited.Models; 8 | 9 | namespace PartsUnlimited.Api 10 | { 11 | [RoutePrefix("api/products")] 12 | public class ProductsController : ApiController 13 | { 14 | private readonly IPartsUnlimitedContext _context; 15 | 16 | public ProductsController(IPartsUnlimitedContext context) 17 | { 18 | _context = context; 19 | } 20 | 21 | [HttpGet, Route] 22 | public IEnumerable Get(bool sale = false) 23 | { 24 | if (!sale) 25 | { 26 | return _context.Products; 27 | } 28 | 29 | return _context.Products.Where(p => p.Price != p.SalePrice); 30 | } 31 | 32 | [HttpGet, Route("{id}")] 33 | public async Task Get(int id) 34 | { 35 | var product = await _context.Products.FirstOrDefaultAsync(p => p.ProductId == id); 36 | if (product == null) 37 | { 38 | return NotFound(); 39 | } 40 | 41 | return Content(HttpStatusCode.OK, product); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/api/RaincheckController.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | using PartsUnlimited.Utils; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | using System.Web.Http; 6 | 7 | namespace PartsUnlimited.Api 8 | { 9 | [RoutePrefix("api/raincheck")] 10 | public class RaincheckController : ApiController 11 | { 12 | private readonly IRaincheckQuery _query; 13 | 14 | public RaincheckController(IRaincheckQuery query) 15 | { 16 | _query = query; 17 | } 18 | 19 | [HttpGet, Route] 20 | public Task> Get() 21 | { 22 | return _query.GetAllAsync(); 23 | } 24 | 25 | [HttpGet, Route("{id}")] 26 | public Task Get(int id) 27 | { 28 | return _query.FindAsync(id); 29 | } 30 | 31 | [HttpPost, Route] 32 | public Task Post([FromBody]Raincheck raincheck) 33 | { 34 | return _query.AddAsync(raincheck); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/favicon.ico -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MicrosoftLearning/edX-DEV212x-Intro-to-DevOps/0889216ed9192999fecdca7cb65a997ee52d3f1c/src/src/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/test/PartsUnlimited.UnitTests/Controllers/HomeControllerTests.cs: -------------------------------------------------------------------------------- 1 | using FakeDbSet; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using Moq; 4 | using PartsUnlimited.Controllers; 5 | using PartsUnlimited.Models; 6 | using PartsUnlimited.UnitTests.Fakes; 7 | using PartsUnlimited.ViewModels; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | using System.Web.Mvc; 14 | 15 | namespace PartsUnlimited.UnitTests.Controllers 16 | { 17 | [TestClass] 18 | public class HomeControllerTests 19 | { 20 | [TestMethod] 21 | public void Home_Index() 22 | { 23 | // arrange 24 | var controller = new HomeController(new FakeDataContext()); 25 | 26 | // act 27 | ViewResult result = controller.Index() as ViewResult; 28 | 29 | // assert 30 | Assert.IsNotNull(result); 31 | var model = result.Model as HomeViewModel; 32 | Assert.IsNotNull(model); 33 | Assert.AreEqual(4, model.TopSellingProducts.Count); 34 | Assert.IsTrue(model.TopSellingProducts.Any(t => t.ProductId == 1)); 35 | Assert.IsTrue(model.TopSellingProducts.Any(t => t.ProductId == 2)); 36 | Assert.IsTrue(model.TopSellingProducts.Any(t => t.ProductId == 3)); 37 | Assert.IsTrue(model.TopSellingProducts.Any(t => t.ProductId == 4)); 38 | Assert.IsFalse(model.TopSellingProducts.Any(t => t.ProductId == 5)); 39 | Assert.IsFalse(model.TopSellingProducts.Any(t => t.ProductId == 6)); 40 | Assert.AreEqual(4, model.NewProducts.Count); 41 | Assert.AreEqual(4, model.CommunityPosts.Count); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/test/PartsUnlimited.UnitTests/Fakes/MockHttpContext.cs: -------------------------------------------------------------------------------- 1 | using Moq; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.Specialized; 5 | using System.Linq; 6 | using System.Net; 7 | using System.Security.Principal; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Web; 11 | 12 | namespace PartsUnlimited.UnitTests.Fakes 13 | { 14 | public class MockHttpContext : HttpContextBase 15 | { 16 | private Mock fakeRequest; 17 | private readonly IPrincipal _user; 18 | 19 | public MockHttpContext(string username = "bob", NameValueCollection queryString = null) 20 | { 21 | _user = new GenericPrincipal(new GenericIdentity(username), null /* roles */); 22 | 23 | fakeRequest = new Mock(); 24 | fakeRequest.Setup(r => r.Headers).Returns( 25 | new WebHeaderCollection() 26 | { 27 | { "X-Requested-With", "XMLHttpRequest" } 28 | } 29 | ); 30 | fakeRequest.Setup(r => r.QueryString).Returns(queryString); 31 | } 32 | 33 | 34 | public override IPrincipal User 35 | { 36 | get 37 | { 38 | return _user; 39 | } 40 | set 41 | { 42 | base.User = value; 43 | } 44 | } 45 | 46 | public override HttpRequestBase Request 47 | { 48 | get 49 | { 50 | return fakeRequest.Object; 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/test/PartsUnlimited.UnitTests/ProductSearch/ProductSearchTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using PartsUnlimited.ProductSearch; 3 | using PartsUnlimited.UnitTests.Fakes; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace PartsUnlimited.UnitTests.ProductSearch 11 | { 12 | [TestClass] 13 | public class ProductSearchTests 14 | { 15 | [TestMethod] 16 | public async Task ProductSearch_TestStringExistingProduct() 17 | { 18 | var prodSearch = new StringContainsProductSearch(new FakeDataContext()); 19 | var result = await prodSearch.Search("proDucT 1"); 20 | Assert.AreEqual(1, result.Count()); 21 | Assert.IsTrue(result.Any(p => p.Title == "Product 1")); 22 | } 23 | 24 | [TestMethod] 25 | public async Task ProductSearch_TestStringExistingProductPartial() 26 | { 27 | var prodSearch = new StringContainsProductSearch(new FakeDataContext()); 28 | var result = await prodSearch.Search("proD"); 29 | Assert.AreEqual(6, result.Count()); 30 | } 31 | 32 | [TestMethod] 33 | public async Task ProductSearch_TestStringNoHit() 34 | { 35 | var prodSearch = new StringContainsProductSearch(new FakeDataContext()); 36 | var result = await prodSearch.Search("nothing"); 37 | Assert.AreEqual(0, result.Count()); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/test/PartsUnlimited.UnitTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PartsUnlimited.UnitTests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PartsUnlimited.UnitTests")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("cfea84f3-d81a-4391-8349-d4f9dd38a000")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/test/PartsUnlimited.UnitTests/Utils/OrdersQueryTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using PartsUnlimited.UnitTests.Fakes; 3 | using PartsUnlimited.Utils; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace PartsUnlimited.UnitTests.Utils 11 | { 12 | [TestClass] 13 | public class OrdersQueryTests 14 | { 15 | [TestMethod] 16 | public async Task OrdersQuery_IndexHelperWithNoUsername() 17 | { 18 | var ordersQuery = new OrdersQuery(new FakeDataContext()); 19 | var model = await ordersQuery.IndexHelperAsync(null, new DateTime(2016, 1, 1), new DateTime(2016, 1, 3), null, false); 20 | 21 | Assert.AreEqual(2, model.Orders.Count()); 22 | } 23 | 24 | [TestMethod] 25 | public async Task OrdersQuery_IndexHelperWithUsername() 26 | { 27 | var ordersQuery = new OrdersQuery(new FakeDataContext()); 28 | var model = await ordersQuery.IndexHelperAsync("bob", new DateTime(2016, 1, 1), new DateTime(2016, 1, 3), null, false); 29 | 30 | Assert.AreEqual(1, model.Orders.Count()); 31 | Assert.IsTrue(model.Orders.Any(o => o.Username == "bob")); 32 | Assert.IsFalse(model.Orders.Any(o => o.Username == "sue")); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/PartsUnlimited.UnitTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------