This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-StrictMode -Version 2.0 | |
$ErrorActionPreference = "Stop" | |
<# | |
.SYNOPSIS | |
Classes and properties utilized by the scripts to update SolrCloud in a blue/green environment | |
#> | |
class OctopusMachineSettings | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using module ".\BlueGreenSolrSettings.psm1" | |
Set-StrictMode -Version 2.0 | |
$ErrorActionPreference = "Stop" | |
<# | |
.SYNOPSIS | |
Creates a BlueGreenSolrSettings object with property values defined by Octopus variables. | |
.PARAMETER Settings | |
An string dictionary passed in from Octopus deploy containing the variables used in | |
the defined deployment process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using module ".\BlueGreenSolrSettings.psm1" | |
$ErrorActionPreference = "Stop" | |
<# | |
.SYNOPSIS | |
Pushes the specified config and related pieces to the SolrCloud Zookeepers. | |
.PARAMETER solrPath | |
Path on the machine to the Solr installation. | |
EX: C:\solr\solr-6.2.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using module ".\BlueGreenSolrSettings.psm1" | |
using module ".\BlueGreenSolrSettingsMap.psm1" | |
<# | |
.SYNOPSIS | |
Calls the Solr functions for SolrCloud CDCR to update a Live environment (with Octopus deploy). | |
The .\BlueGreenSolrSettingsMap.psm1 file is used to map Octopus-defined variable values to | |
the .\BlueGreenSolrSettings.psm1 properties. | |
.PARAMETER startingReplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using module ".\BlueGreenSolrSettings.psm1" | |
using module ".\LocalSettings.psm1" | |
<# | |
.SYNOPSIS | |
Calls the Solr functions for SolrCloud CDCR to test in a non-live environment (without Octopus deploy). | |
The .\LocalSettings.psm1 file is used to map user-defined variable values to | |
the .\BlueGreenSolrSettings.psm1 properties. | |
.PARAMETER startingReplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using module ".\BlueGreenSolrSettings.psm1" | |
Set-StrictMode -Version 2.0 | |
$ErrorActionPreference = "Stop" | |
<# | |
.SYNOPSIS | |
Creates a BlueGreenSolrSettings object with property values defined by the user | |
#> | |
function Get-LocalBlueGreenSolrSettings() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$root = gi master:// -id "{C557F52C-BDBA-4F3D-BAD0-E315AD39C9CB}" | |
$items = $root | ls -r | ?{$_.TemplateName -eq "<TEMPLATE NAME>"} | |
$fieldName = "<FIELD NAME>" | |
foreach($i in $items){ | |
if(-not([string]::IsNullOrWhitespace($i.Fields[$fieldName]))){ | |
$i.Name + " : " + $i.Fields[$fieldName].Value + " : " + $i.Paths.FullPath | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Sitecore.ExperienceForms.Mvc.Models.Fields; | |
namespace Sample.Feature.Forms.ViewModels | |
{ | |
[Serializable] | |
public class StringInputEncryptedViewModel : StringInputViewModel | |
{ | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Sitecore.ExperienceForms.Mvc.Html | |
@model Sample.Feature.Forms.ViewModels.StringInputEncryptedViewModel | |
<label for="@Html.IdFor(m => Model.Value)" class="@Model.LabelCssClass">@Html.DisplayTextFor(t => Model.Title)</label> | |
<input id="@Html.IdFor(m => Model.Value)" name="@Html.NameFor(m => Model.Value)" class="@Model.CssClass" type="text" value="@Model.Value" @if (Model.MaxLength > 0) { <text> maxlength="@Model.MaxLength" </text> } placeholder="@Model.PlaceholderText" data-sc-tracking="@Model.IsTrackingEnabled" data-sc-field-name="@Model.Name" data-sc-field-key="@Model.ConditionSettings.FieldKey" @Html.GenerateUnobtrusiveValidationAttributes(m => m.Value) /> | |
@Html.ValidationMessageFor(m => Model.Value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using Sample.Foundation.Core.Helpers; | |
using Sitecore.Diagnostics; | |
using Sitecore.ExperienceForms.Data; | |
using Sitecore.ExperienceForms.Data.Entities; | |
using Sitecore.ExperienceForms.Models; | |
using Sitecore.ExperienceForms.Processing; |