Merge branch 'stable-2.16'
* stable-2.16: Fix account and group query with Elasticsearch 6 Fix support for "SystemVerilog" Add "Show Relative Dates In Changes Table" to settings preference Update syntax highlighting class Change-Id: I0189b0e27d923d638aee2bc5779dca7261084841
This commit is contained in:
		@@ -93,8 +93,7 @@ public class ElasticAccountIndex extends AbstractElasticIndex<Account.Id, Accoun
 | 
				
			|||||||
  public DataSource<AccountState> getSource(Predicate<AccountState> p, QueryOptions opts)
 | 
					  public DataSource<AccountState> getSource(Predicate<AccountState> p, QueryOptions opts)
 | 
				
			||||||
      throws QueryParseException {
 | 
					      throws QueryParseException {
 | 
				
			||||||
    JsonArray sortArray = getSortArray(AccountField.ID.getName());
 | 
					    JsonArray sortArray = getSortArray(AccountField.ID.getName());
 | 
				
			||||||
    return new ElasticQuerySource(
 | 
					    return new ElasticQuerySource(p, opts.filterFields(IndexUtils::accountFields), type, sortArray);
 | 
				
			||||||
        p, opts.filterFields(IndexUtils::accountFields), ACCOUNTS, sortArray);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Override
 | 
					  @Override
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -91,7 +91,7 @@ public class ElasticGroupIndex extends AbstractElasticIndex<AccountGroup.UUID, I
 | 
				
			|||||||
  public DataSource<InternalGroup> getSource(Predicate<InternalGroup> p, QueryOptions opts)
 | 
					  public DataSource<InternalGroup> getSource(Predicate<InternalGroup> p, QueryOptions opts)
 | 
				
			||||||
      throws QueryParseException {
 | 
					      throws QueryParseException {
 | 
				
			||||||
    JsonArray sortArray = getSortArray(GroupField.UUID.getName());
 | 
					    JsonArray sortArray = getSortArray(GroupField.UUID.getName());
 | 
				
			||||||
    return new ElasticQuerySource(p, opts.filterFields(IndexUtils::groupFields), GROUPS, sortArray);
 | 
					    return new ElasticQuerySource(p, opts.filterFields(IndexUtils::groupFields), type, sortArray);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Override
 | 
					  @Override
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -207,6 +207,16 @@ limitations under the License.
 | 
				
			|||||||
              </gr-select>
 | 
					              </gr-select>
 | 
				
			||||||
            </span>
 | 
					            </span>
 | 
				
			||||||
          </section>
 | 
					          </section>
 | 
				
			||||||
 | 
					          <section>
 | 
				
			||||||
 | 
					            <span class="title">Show Relative Dates In Changes Table</span>
 | 
				
			||||||
 | 
					            <span class="value">
 | 
				
			||||||
 | 
					              <input
 | 
				
			||||||
 | 
					                  id="relativeDateInChangeTable"
 | 
				
			||||||
 | 
					                  type="checkbox"
 | 
				
			||||||
 | 
					                  checked$="[[_localPrefs.relative_date_in_change_table]]"
 | 
				
			||||||
 | 
					                  on-change="_handleRelativeDateInChangeTable">
 | 
				
			||||||
 | 
					            </span>
 | 
				
			||||||
 | 
					          </section>
 | 
				
			||||||
          <section>
 | 
					          <section>
 | 
				
			||||||
            <span class="title">Diff view</span>
 | 
					            <span class="title">Diff view</span>
 | 
				
			||||||
            <span class="value">
 | 
					            <span class="value">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,6 +29,7 @@
 | 
				
			|||||||
    'signed_off_by',
 | 
					    'signed_off_by',
 | 
				
			||||||
    'email_format',
 | 
					    'email_format',
 | 
				
			||||||
    'size_bar_in_change_table',
 | 
					    'size_bar_in_change_table',
 | 
				
			||||||
 | 
					    'relative_date_in_change_table',
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const GERRIT_DOCS_BASE_URL = 'https://gerrit-review.googlesource.com/' +
 | 
					  const GERRIT_DOCS_BASE_URL = 'https://gerrit-review.googlesource.com/' +
 | 
				
			||||||
@@ -270,6 +271,11 @@
 | 
				
			|||||||
      this._prefsChanged = true;
 | 
					      this._prefsChanged = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    _handleRelativeDateInChangeTable() {
 | 
				
			||||||
 | 
					      this.set('_localPrefs.relative_date_in_change_table',
 | 
				
			||||||
 | 
					          this.$.relativeDateInChangeTable.checked);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _handleShowSizeBarsInFileListChanged() {
 | 
					    _handleShowSizeBarsInFileListChanged() {
 | 
				
			||||||
      this.set('_localPrefs.size_bar_in_change_table',
 | 
					      this.set('_localPrefs.size_bar_in_change_table',
 | 
				
			||||||
          this.$.showSizeBarsInFileList.checked);
 | 
					          this.$.showSizeBarsInFileList.checked);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,6 +88,7 @@ limitations under the License.
 | 
				
			|||||||
        email_strategy: 'ENABLED',
 | 
					        email_strategy: 'ENABLED',
 | 
				
			||||||
        email_format: 'HTML_PLAINTEXT',
 | 
					        email_format: 'HTML_PLAINTEXT',
 | 
				
			||||||
        default_base_for_merges: 'FIRST_PARENT',
 | 
					        default_base_for_merges: 'FIRST_PARENT',
 | 
				
			||||||
 | 
					        relative_date_in_change_table: false,
 | 
				
			||||||
        size_bar_in_change_table: true,
 | 
					        size_bar_in_change_table: true,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        my: [
 | 
					        my: [
 | 
				
			||||||
@@ -151,6 +152,9 @@ limitations under the License.
 | 
				
			|||||||
          .firstElementChild.bindValue, preferences.email_format);
 | 
					          .firstElementChild.bindValue, preferences.email_format);
 | 
				
			||||||
      assert.equal(valueOf('Default Base For Merges', 'preferences')
 | 
					      assert.equal(valueOf('Default Base For Merges', 'preferences')
 | 
				
			||||||
          .firstElementChild.bindValue, preferences.default_base_for_merges);
 | 
					          .firstElementChild.bindValue, preferences.default_base_for_merges);
 | 
				
			||||||
 | 
					      assert.equal(
 | 
				
			||||||
 | 
					          valueOf('Show Relative Dates In Changes Table', 'preferences')
 | 
				
			||||||
 | 
					              .firstElementChild.checked, false);
 | 
				
			||||||
      assert.equal(valueOf('Diff view', 'preferences')
 | 
					      assert.equal(valueOf('Diff view', 'preferences')
 | 
				
			||||||
          .firstElementChild.bindValue, preferences.diff_view);
 | 
					          .firstElementChild.bindValue, preferences.diff_view);
 | 
				
			||||||
      assert.equal(valueOf('Show size bars in file list', 'preferences')
 | 
					      assert.equal(valueOf('Show size bars in file list', 'preferences')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -210,8 +210,8 @@ sql = text/x-sql
 | 
				
			|||||||
ss = text/x-scheme
 | 
					ss = text/x-scheme
 | 
				
			||||||
st = text/x-stsrc
 | 
					st = text/x-stsrc
 | 
				
			||||||
stex = text/x-stex
 | 
					stex = text/x-stex
 | 
				
			||||||
sv = x-systemverilog
 | 
					sv = text/x-systemverilog
 | 
				
			||||||
svh = x-systemverilog
 | 
					svh = text/x-systemverilog
 | 
				
			||||||
swift = text/x-swift
 | 
					swift = text/x-swift
 | 
				
			||||||
tcl = text/x-tcl
 | 
					tcl = text/x-tcl
 | 
				
			||||||
tex = text/x-latex
 | 
					tex = text/x-latex
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user