Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e_test/hawk_test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Xpath:
HREF_REPORTS = '//a[contains(@href, "/reports")]'
HREF_TAGS = '//a[contains(@href, "#tags")]'
MODAL_MONITOR_TIMEOUT = '//*[@id="modal"]/div/div/form/div[2]/fieldset/div/div[1]/div'
MODAL_STOP = '//*[@id="modal"]/div/div/form/div[2]/fieldset/div/div[2]/div/div/select/option[6]'
MODAL_STOP = '//*[@id="modal"]/div/div/form/div[2]/fieldset/div//div/div/select[@name="temp_op"]/option[6]'
MODAL_TIMEOUT = '//*[@id="modal"]/div/div/form/div[2]/fieldset/div/div[1]/div/div'
NODE_DETAILS = '//*[@id="nodes"]//table/tbody/tr[1]/td[5]/div/a[2]'
NODE_MAINT = '//a[(contains(@href, "maintenance") or contains(@class, "maintenance")) and contains(@title, "Switch to maintenance")]'
Expand Down
12 changes: 12 additions & 0 deletions hawk/app/assets/javascripts/module/attrlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
this.mapping = this.$el.data('attrlist-mapping');
this.freeform = this.$el.data('attrlist-freeform') == 'yes';

// existing is an array of allowed parameters
var existing = this.values instanceof Array
? this.values[0] // for multi-monitor in m/s resource
: this.values; // for the normal case
var mapping = this.mapping;
// if there is some custom/non-existing parameter --> show it anyway
$.each(Object.keys(existing), function(index, key) {
if (!(key in mapping)) {
mapping[key] = { default: '', longdesc: '' };
}
});

this.available = Object.keys(this.mapping).filter(function(attr) {
return !attr.match(/jQuery\d+/);
});
Expand Down
Loading