Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: appengine/monorail/templates/framework/filter-rule-admin-part.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <style>
2 #rules th, #rules td { padding-bottom: 1em }
3 </style>
4
5 [# If any value is supplied for arg0, the user will be able to set actions
6 that set default owner, set default status, and add CC users.]
7 <h4 id="filters">Filter rules</h4>
8 <div class="section">
9
10 <div class="closed">
11 <div>Filter rules can help you fill in defaults and stay organized.
12 <a class="ifClosed toggleHidden" href="#"
13 style="font-size:90%; margin-left:.5em">Learn more</a>
14 </div>
15
16 <div id="filterhelp" class="ifOpened help">
17 Filter rules can help your team triage issues by automatically
18 filling in default values based on other values. They can be used
19 in the same way that you might use message filters in an email client.
20 Filter rules are evaluated after each edit, not just on new items. And,
21 filter rules only add values or set default values, they never override
22 values that were explicitly set by a user.<br>
23 <br>
24 Note that exclusive prefixes still apply. So, if a user has set a label
25 with one of the exclusive prefixes, a rule that adds another label with
26 the same prefix will have no effect.
27 </div>
28 <br>
29
30 <table border="0" id="rules">
31 <tr>
32 <th></th>
33 <th style="text-align:left">If the issue matches this query:</th>
34 <th colspan="2" style="text-align:left">Then, [if-any arg0]do the following[ else]add these labels[end]:</th>
35 <th></th>
36 </tr>
37
38 [for rules]
39 <tr>
40 <td style="text-align:right" width="20">[rules.idx].</td>
41 <td><input type="text" name="predicate[rules.idx]" size="60" value="[rules.p redicate]"
42 autocomplete="off" id="predicate_existing_[rules.idx]" class="aco b"></td>
43 <td>
44 [if-any arg0]
45 <select name="action_type[rules.idx]">
46 <option value="" disabled="disabled" [is rules.action_type ""]selected= "selected"[end]>Choose...</option>
47 <option value="default_status" [is rules.action_type "default_status"]s elected="selected"[end]>Set default status:</option>
48 <option value="default_owner" [is rules.action_type "default_owner"]sel ected="selected"[end]>Set default owner:</option>
49 <option value="add_ccs" [is rules.action_type "add_ccs"]selected="selec ted"[end]>Add Cc:</option>
50 <option value="add_labels" [is rules.action_type "add_labels"]selected= "selected"[end]>Add labels:</option>
51 <option value="also_notify" [is rules.action_type "also_notify"]selecte d="selected"[end]>Also notify email:</option>
52 </select>
53 [end]
54 </td>
55 <td>
56 <input type="text" name="action_value[rules.idx]" size="70" value="[rules. action_value]" class="acob">
57 </td>
58 <td></td>
59 </tr>
60 [end]
61
62 [for new_rule_indexes]
63 <tr id="newrow[new_rule_indexes]" [if-index new_rule_indexes first][else]styl e="display:none"[end]>
64 <td style="text-align:right" width="20">[new_rule_indexes].</td>
65 <td><input type="text" name="new_predicate[new_rule_indexes]" size="60" valu e=""
66 class="showNextRuleRow acob" data-index="[new_rule_indexes]"
67 autocomplete="off" id="predicate_new_[new_rule_indexes]"></td>
68 <td>
69 [if-any arg0]
70 <select name="new_action_type[new_rule_indexes]">
71 <option value="" disabled="disabled" selected="selected">Choose...</opt ion>
72 <option value="default_status">Set default status:</option>
73 <option value="default_owner">Set default owner:</option>
74 <option value="add_ccs">Add Cc:</option>
75 <option value="add_labels">Add labels:</option>
76 <option value="also_notify">Also notify email:</option>
77 </select>
78 [end]
79 </td>
80 <td>
81 <input type="text" name="new_action_value[new_rule_indexes]" size="70" val ue="" class="acob">
82 [# TODO(jrobbins): figure out a way to display error messages on each rule . ]
83 </td>
84 <td width="40px">
85 [if-index new_rule_indexes last][else]
86 <span id="addrow[new_rule_indexes]" class="fakelink" class="fakelink" data -index="[new_rule_indexes]">Add a row</span
87 [end]
88 </td>
89 </tr>
90 [end]
91
92 </table>
93 </div>
94
95 [if-any errors.rules]
96 [for errors.rules]
97 <div class="fielderror">[errors.rules]</div>
98 [end]
99 <script type="text/javascript" nonce="[nonce]">
100 runOnLoad(function() {
101 document.location.hash = 'filters';
102 });
103 </script>
104 [end]
105
106 </div>
107
108 <script type="text/javascript" nonce="[nonce]">
109 runOnLoad(function() {
110 function showNextRuleRow(i) {
111 if (i < [max_rules]) {
112 _showID('newrow' + (i + 1));
113 _hideID('addrow' + i);
114 }
115 }
116
117 var addARowLinks = document.getElementsByClassName("fakelink");
118 for (var i = 0; i < addARowLinks.length; ++i) {
119 var link = addARowLinks[[]i];
120 link.addEventListener("click", function(event) {
121 var index = Number(event.target.getAttribute("data-index"));
122 showNextRuleRow(index);
123 });
124 }
125
126 var typeToAddARow = document.getElementsByClassName("showNextRuleRow");
127 for (var i = 0; i < typeToAddARow.length; ++i) {
128 var el = typeToAddARow[[]i];
129 el.addEventListener("keydown", function(event) {
130 var index = Number(event.target.getAttribute("data-index"));
131 showNextRuleRow(index);
132 });
133 }
134
135 var acobElements = document.getElementsByClassName("acob");
136 for (var i = 0; i < acobElements.length; ++i) {
137 var el = acobElements[[]i];
138 el.addEventListener("focus", function(event) {
139 _acrob(null);
140 _acof(event);
141 });
142 }
143
144 var acobElements = document.getElementsByClassName("acob");
145 for (var i = 0; i < acobElements.length; ++i) {
146 var el = acobElements[[]i];
147 el.addEventListener("focus", function(event) {
148 _acrob(null);
149 _acof(event);
150 });
151 }
152 });
153 </script>
OLDNEW
« no previous file with comments | « appengine/monorail/templates/framework/file-content-part.ezt ('k') | appengine/monorail/templates/framework/footer-script.ezt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698