blob: 01269b91c60cdb5ca6e3029d97e3383753865768 [file] [log] [blame]
<!--
@license
Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<dom-module id="gr-reviewers-by-blame-config">
<template>
<style include="shared-styles"></style>
<style include="gr-form-styles"></style>
<style>
.sectionTitle {
padding-top: 2em;
}
</style>
<fieldset class="gr-form-styles">
<h2 class="sectionTitle">Reviewers-By-Blame Options</h2>
<section>
<span class="title">Ignore file regex</span>
<span class="value">
<iron-input bind-value="{{_changedConfig.ignoreFileRegEx.value}}">
<input id="ignoreFileRegEx"
value="{{_changedConfig.ignoreFileRegEx.value::input}}"
type="text"
on-input="_handlePrefsChanged">
</iron-input>
</span>
<span class="value">
[[_formatInheritedValue(_appliedConfig.ignoreFileRegEx.inherited_value)]]
</span>
</section>
<section>
<span class="title">Ignore regex</span>
<span class="value">
<iron-input bind-value="{{_changedConfig.ignoreSubjectRegEx.value}}">
<input id="ignoreSubjectRegEx"
value="{{_changedConfig.ignoreSubjectRegEx.value::input}}"
type="text"
on-input="_handlePrefsChanged">
</iron-input>
</span>
<span class="value">
[[_formatInheritedValue(_appliedConfig.ignoreSubjectRegEx.inherited_value)]]
</span>
</section>
<section>
<span class="title">Max reviewers</span>
<span class="value">
<iron-input bind-value="{{_changedConfig._maxReviewers.value}}">
<input id="maxReviewers"
value="{{_changedConfig.maxReviewers.value::input}}"
prevent-invalid-input
allowed-pattern="[0-9]"
type="number"
on-keypress="_handlePrefsChanged"
on-change="_handlePrefsChanged">
</iron-input>
</span>
<span class="value">
[[_formatInheritedValue(_appliedConfig.maxReviewers.inherited_value)]]
</span>
</section>
<gr-button id="saveButton"
on-click="_handlePrefsSave"
disabled="[[!_prefsChanged]]">
Save Changes
</gr-button>
</fieldset>
</template>
<script src="gr-reviewers-by-blame-config.js"></script>
</dom-module>