Merge "PolyGerrit: Add some more missing configs to gr-project"
This commit is contained in:
@@ -44,10 +44,10 @@ limitations under the License.
|
|||||||
#loading:not(.loading) {
|
#loading:not(.loading) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#noteDbSettings {
|
.projectSettings {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#noteDbSettings.showNoteDb {
|
.projectSettings.showConfig {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -157,6 +157,40 @@ limitations under the License.
|
|||||||
</gr-select>
|
</gr-select>
|
||||||
</span>
|
</span>
|
||||||
</section>
|
</section>
|
||||||
|
<section
|
||||||
|
id="enableSignedPushSettings"
|
||||||
|
class$="projectSettings [[_computeProjectsClass(_projectConfig.enable_signed_push)]]">
|
||||||
|
<span class="title">Enable signed push</span>
|
||||||
|
<span class="value">
|
||||||
|
<gr-select
|
||||||
|
id="enableSignedPush"
|
||||||
|
bind-value="{{_projectConfig.enable_signed_push.configured_value}}">
|
||||||
|
<select disabled$="[[_readOnly]]">
|
||||||
|
<template is="dom-repeat"
|
||||||
|
items="[[_formatBooleanSelect(_projectConfig.enable_signed_push)]]">
|
||||||
|
<option value="[[item.value]]">[[item.label]]</option>
|
||||||
|
</template>
|
||||||
|
</select>
|
||||||
|
</gr-select>
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
|
<section
|
||||||
|
id="requireSignedPushSettings"
|
||||||
|
class$="projectSettings [[_computeProjectsClass(_projectConfig.require_signed_push)]]">
|
||||||
|
<span class="title">Require signed push</span>
|
||||||
|
<span class="value">
|
||||||
|
<gr-select
|
||||||
|
id="requireSignedPush"
|
||||||
|
bind-value="{{_projectConfig.require_signed_push.configured_value}}">
|
||||||
|
<select disabled$="[[_readOnly]]">
|
||||||
|
<template is="dom-repeat"
|
||||||
|
items="[[_formatBooleanSelect(_projectConfig.require_signed_push)]]">
|
||||||
|
<option value="[[item.value]]">[[item.label]]</option>
|
||||||
|
</template>
|
||||||
|
</select>
|
||||||
|
</gr-select>
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<span class="title">
|
<span class="title">
|
||||||
Reject implicit merges when changes are pushed for review</span>
|
Reject implicit merges when changes are pushed for review</span>
|
||||||
@@ -173,7 +207,7 @@ limitations under the License.
|
|||||||
</gr-select>
|
</gr-select>
|
||||||
</span>
|
</span>
|
||||||
</section>
|
</section>
|
||||||
<section id="noteDbSettings class$=[[_computeNoteDbClass(_noteDbEnabled)]]">
|
<section id="noteDbSettings" class$="projectSettings [[_computeProjectsClass(_noteDbEnabled)]]">
|
||||||
<span class="title">
|
<span class="title">
|
||||||
Enable adding unregistered users as reviewers and CCs on changes</span>
|
Enable adding unregistered users as reviewers and CCs on changes</span>
|
||||||
<span class="value">
|
<span class="value">
|
||||||
|
@@ -255,8 +255,8 @@
|
|||||||
return commands;
|
return commands;
|
||||||
},
|
},
|
||||||
|
|
||||||
_computeNoteDbClass(noteDB) {
|
_computeProjectsClass(config) {
|
||||||
return noteDB ? 'showNoteDb': '';
|
return config ? 'showConfig': '';
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
@@ -73,6 +73,14 @@ limitations under the License.
|
|||||||
value: false,
|
value: false,
|
||||||
configured_value: 'FALSE',
|
configured_value: 'FALSE',
|
||||||
},
|
},
|
||||||
|
enable_signed_push: {
|
||||||
|
value: false,
|
||||||
|
configured_value: 'FALSE',
|
||||||
|
},
|
||||||
|
require_signed_push: {
|
||||||
|
value: false,
|
||||||
|
configured_value: 'FALSE',
|
||||||
|
},
|
||||||
reject_implicit_merges: {
|
reject_implicit_merges: {
|
||||||
value: false,
|
value: false,
|
||||||
configured_value: 'FALSE',
|
configured_value: 'FALSE',
|
||||||
@@ -244,15 +252,16 @@ limitations under the License.
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('fields update and save correctly', done => {
|
test('fields update and save correctly', done => {
|
||||||
|
// test notedb
|
||||||
element._noteDbEnabled = false;
|
element._noteDbEnabled = false;
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
element._computeNoteDbClass(element._noteDbEnabled), '');
|
element._computeProjectsClass(element._noteDbEnabled), '');
|
||||||
|
|
||||||
element._noteDbEnabled = true;
|
element._noteDbEnabled = true;
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
element._computeNoteDbClass(element._noteDbEnabled), 'showNoteDb');
|
element._computeProjectsClass(element._noteDbEnabled), 'showConfig');
|
||||||
|
|
||||||
const configInputObj = {
|
const configInputObj = {
|
||||||
description: 'new description',
|
description: 'new description',
|
||||||
@@ -261,6 +270,8 @@ limitations under the License.
|
|||||||
use_signed_off_by: 'TRUE',
|
use_signed_off_by: 'TRUE',
|
||||||
create_new_change_for_all_not_in_target: 'TRUE',
|
create_new_change_for_all_not_in_target: 'TRUE',
|
||||||
require_change_id: 'TRUE',
|
require_change_id: 'TRUE',
|
||||||
|
enable_signed_push: 'TRUE',
|
||||||
|
require_signed_push: 'TRUE',
|
||||||
reject_implicit_merges: 'TRUE',
|
reject_implicit_merges: 'TRUE',
|
||||||
private_by_default: 'TRUE',
|
private_by_default: 'TRUE',
|
||||||
match_author_to_committer_date: 'TRUE',
|
match_author_to_committer_date: 'TRUE',
|
||||||
@@ -289,6 +300,10 @@ limitations under the License.
|
|||||||
configInputObj.create_new_change_for_all_not_in_target;
|
configInputObj.create_new_change_for_all_not_in_target;
|
||||||
element.$.requireChangeIdSelect.bindValue =
|
element.$.requireChangeIdSelect.bindValue =
|
||||||
configInputObj.require_change_id;
|
configInputObj.require_change_id;
|
||||||
|
element.$.enableSignedPush.bindValue =
|
||||||
|
configInputObj.enable_signed_push;
|
||||||
|
element.$.requireSignedPush.bindValue =
|
||||||
|
configInputObj.require_signed_push;
|
||||||
element.$.rejectImplicitMergesSelect.bindValue =
|
element.$.rejectImplicitMergesSelect.bindValue =
|
||||||
configInputObj.reject_implicit_merges;
|
configInputObj.reject_implicit_merges;
|
||||||
element.$.setAllnewChangesPrivateByDefaultSelect.bindValue =
|
element.$.setAllnewChangesPrivateByDefaultSelect.bindValue =
|
||||||
|
Reference in New Issue
Block a user