diff --git a/src/Raven.Studio/typescript/viewmodels/database/identities/identities.ts b/src/Raven.Studio/typescript/viewmodels/database/identities/identities.ts index ad626f9262d9..dffb0a07d532 100644 --- a/src/Raven.Studio/typescript/viewmodels/database/identities/identities.ts +++ b/src/Raven.Studio/typescript/viewmodels/database/identities/identities.ts @@ -21,7 +21,8 @@ class identity { currentValue = ko.observable(); warnAboutSmallerValue: KnockoutComputed; - nextDocumentText: KnockoutComputed; + textForEditIdentity: KnockoutComputed; + textForNewIdentity: KnockoutComputed; identitySeparator = ko.observable(); static readonly defaultIdentitySeparator = "/"; @@ -59,11 +60,27 @@ class identity { return prefix; }); - this.nextDocumentText = ko.pureComputed(() => { - return `The effective identity separator defined in configuration is: ${genUtils.escapeHtml(this.identitySeparator())}
- The next document that will be created with Prefix: "${genUtils.escapeHtml(this.prefixWithPipe())}" - will have ID: "${genUtils.escapeHtml(this.prefixWithoutPipe())}${this.identitySeparator()}${this.value() + 1}"`; + this.textForEditIdentity = ko.pureComputed(() => { + return `
    +
  • The next document that will be created using a pipe symbol, e.g.: ${genUtils.escapeHtml(this.prefixWithPipe())}, + will have ID: ${genUtils.escapeHtml(this.prefixWithoutPipe())}${this.identitySeparator()}${this.value() + 1} +
  • +
  • ${separatorText}
  • +
`; }); + + this.textForNewIdentity = ko.pureComputed(() => { + return `
    +
  • When setting "Prefix" & "Value", the next document created using a pipe symbol, i.e.: <Prefix>|
    + will be assigned an ID structured as <Prefix>${genUtils.escapeHtml(this.identitySeparator())}<Value + 1> +
  • +
  • ${separatorText}
  • +
`; + }); + + const separatorText = + `In the resulting ID, the Prefix and Value parts are separated by the effective separator character defined in your configuration, + which is: ${genUtils.escapeHtml(this.identitySeparator())}`; this.warnAboutSmallerValue = ko.pureComputed(() => { return this.value() < this.currentValue(); diff --git a/src/Raven.Studio/wwwroot/App/views/database/identities/identities.html b/src/Raven.Studio/wwwroot/App/views/database/identities/identities.html index d1ccb3fadecd..12bd6592a3e2 100644 --- a/src/Raven.Studio/wwwroot/App/views/database/identities/identities.html +++ b/src/Raven.Studio/wwwroot/App/views/database/identities/identities.html @@ -11,7 +11,7 @@
- Identities tutorial + Identities tutorial
@@ -33,30 +33,41 @@

Prefix
+ id="prefix" placeholder="Enter the collection for which to set an identity value, e.g. 'orders'">

+ id="value" placeholder="Enter a number that will be the latest identity value for this collection">
-
- -
-
-
-
+
+
+ +
+
+
+
+
+
+ + + New value is smaller than current. Please verify documents with higher identity value do not exist. + +
+
-
-
- - - New value is smaller than current. Please verify documents with higher identity value do not exist. - +
+
+
+
+ +
+
+