diff options
author | Ryan Campbell <ryanjcampbell@google.com> | 2017-09-21 21:16:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-21 21:16:11 +0000 |
commit | 8518397c4c5ecb111a63d76cd167879a0b3210bc (patch) | |
tree | 48634efc33bba5248c3c14d53412b99c8cdb21a2 /src/main/webapp | |
parent | ca3840279d2106ed35d5fdf8601d7b60cc6bd30f (diff) | |
parent | d82fab7c2e4dd9c7c8b2ae65deb21a106a0463e4 (diff) | |
download | dashboard-8518397c4c5ecb111a63d76cd167879a0b3210bc.tar.gz |
Merge changes from topic "inequality filtering"
* changes:
Implement UI for inequality pass/fail filtering.
Implement inequality filtering on pass/fail counts
Create indexes for inequality count filtering.
Diffstat (limited to 'src/main/webapp')
-rw-r--r-- | src/main/webapp/WEB-INF/datastore-indexes.xml | 16 | ||||
-rw-r--r-- | src/main/webapp/WEB-INF/jsp/show_plan_release.jsp | 4 | ||||
-rw-r--r-- | src/main/webapp/WEB-INF/jsp/show_table.jsp | 4 | ||||
-rw-r--r-- | src/main/webapp/WEB-INF/jsp/show_tree.jsp | 4 | ||||
-rw-r--r-- | src/main/webapp/js/search_header.js | 8 |
5 files changed, 30 insertions, 6 deletions
diff --git a/src/main/webapp/WEB-INF/datastore-indexes.xml b/src/main/webapp/WEB-INF/datastore-indexes.xml index f8d66c7..a7234e6 100644 --- a/src/main/webapp/WEB-INF/datastore-indexes.xml +++ b/src/main/webapp/WEB-INF/datastore-indexes.xml @@ -28,6 +28,14 @@ <property name="__key__" direction="desc"/> </datastore-index> + <datastore-index kind="TestPlanRun" ancestor="true" source="manual"> + <property name="passCount" direction="asc"/> + </datastore-index> + + <datastore-index kind="TestPlanRun" ancestor="true" source="manual"> + <property name="failCount" direction="asc"/> + </datastore-index> + <datastore-index kind="TestStatus" ancestor="false" source="manual"> <property name="failCount" direction="asc"/> <property name="passCount" direction="asc"/> @@ -52,6 +60,14 @@ <property name="__key__" direction="desc"/> </datastore-index> + <datastore-index kind="TestRun" ancestor="true" source="manual"> + <property name="passCount" direction="asc"/> + </datastore-index> + + <datastore-index kind="TestRun" ancestor="true" source="manual"> + <property name="failCount" direction="asc"/> + </datastore-index> + <datastore-index kind="TestRun" ancestor="false" source="manual"> <property name="testName" direction="asc"/> <property name="startTimestamp" direction="asc"/> diff --git a/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp b/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp index b259c8a..9a312e9 100644 --- a/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp +++ b/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp @@ -50,11 +50,11 @@ search.addFilter('Test Build ID', 'testBuildId', {}, ${testBuildId}); search.addFilter('Host', 'hostname', {}, ${hostname}); search.addFilter('Passing Count', 'passing', { - type: 'number', + validate: 'inequality', width: 's2' }, ${passing}); search.addFilter('Non-Passing Count', 'nonpassing', { - type: 'number', + validate: 'inequality', width: 's2' }, ${nonpassing}); search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit}); diff --git a/src/main/webapp/WEB-INF/jsp/show_table.jsp b/src/main/webapp/WEB-INF/jsp/show_table.jsp index 4958b4a..93a4a69 100644 --- a/src/main/webapp/WEB-INF/jsp/show_table.jsp +++ b/src/main/webapp/WEB-INF/jsp/show_table.jsp @@ -49,11 +49,11 @@ search.addFilter('Test Build ID', 'testBuildId', {}, ${testBuildId}); search.addFilter('Host', 'hostname', {}, ${hostname}); search.addFilter('Passing Count', 'passing', { - type: 'number', + validate: 'inequality', width: 's2' }, ${passing}); search.addFilter('Non-Passing Count', 'nonpassing', { - type: 'number', + validate: 'inequality', width: 's2' }, ${nonpassing}); search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit}); diff --git a/src/main/webapp/WEB-INF/jsp/show_tree.jsp b/src/main/webapp/WEB-INF/jsp/show_tree.jsp index f838615..8db45cc 100644 --- a/src/main/webapp/WEB-INF/jsp/show_tree.jsp +++ b/src/main/webapp/WEB-INF/jsp/show_tree.jsp @@ -45,11 +45,11 @@ search.addFilter('Test Build ID', 'testBuildId', {}, ${testBuildId}); search.addFilter('Host', 'hostname', {}, ${hostname}); search.addFilter('Passing Count', 'passing', { - type: 'number', + validate: 'inequality', width: 's2' }, ${passing}); search.addFilter('Non-Passing Count', 'nonpassing', { - type: 'number', + validate: 'inequality', width: 's2' }, ${nonpassing}); search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit}); diff --git a/src/main/webapp/js/search_header.js b/src/main/webapp/js/search_header.js index ae53c8b..4f108c4 100644 --- a/src/main/webapp/js/search_header.js +++ b/src/main/webapp/js/search_header.js @@ -15,6 +15,8 @@ */ (function ($) { + var _inequalityRegex = '(^)(<|>|<=|>=|=)?[ ]*?[0-9]+$'; + var _inequalityHint = 'e.g. 5, >0, <=10'; function _validate(input, valueSet) { var value = input.val(); @@ -40,6 +42,12 @@ input.attr('value', value); label.addClass('active'); } + if (config.options.validate == 'inequality') { + input.addClass('validate'); + input.attr('pattern', _inequalityRegex); + input.attr('placeholder', _inequalityHint); + label.addClass('active'); + } input.focusout(function() { config.value = input.val(); }); |