Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
KVstore collections management interfaces improvements #115
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhemmarchand committed Jun 24, 2018
1 parent e2c331c commit e6c93d7
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 66 deletions.
Binary file modified nmon-performance-monitor-for-unix-and-linux-systems_1917.tgz
Binary file not shown.
28 changes: 14 additions & 14 deletions nmon/default/data/ui/html/Manage_alerting_threshold.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,22 +199,22 @@ <h3 style="color: indianred;"><b>alert max value is in percentage and min time i
<label>Enter the host:</label>
</div>
<div class="input input-text" id="input_add_alert_cpu_max_percent">
<label>alert_cpu_max_percent:</label>
<label>cpu max (%):</label>
</div>
<div class="input input-text" id="input_add_alert_cpu_min_time_seconds">
<label>alert_cpu_min_time_seconds:</label>
<label>cpu min time (sec):</label>
</div>
<div class="input input-text" id="input_add_alert_physical_memory_max_percent">
<label>alert_physical_memory_max_percent:</label>
<label>physical memory max (%):</label>
</div>
<div class="input input-text" id="input_add_alert_physical_memory_min_time_seconds">
<label>alert_physical_memory_min_time_seconds:</label>
<label>physical memory min time (sec):</label>
</div>
<div class="input input-text" id="input_add_alert_virtual_memory_max_percent">
<label>alert_virtual_memory_max_percent:</label>
<label>virtual memory max (%):</label>
</div>
<div class="input input-text" id="input_add_alert_virtual_memory_min_time_seconds">
<label>alert_virtual_memory_min_time_seconds:</label>
<label>virtual memory min time (sec):</label>
</div>
<div class="form-submit" id="btn_add_content">
<button class="btn btn-primary submit">Add this entry</button>
Expand Down Expand Up @@ -262,9 +262,9 @@ <h3 style="color: indianred;">The threshold table shows per server threshold cur
<hr>
<p style="color: gray;"><i>Remove or modify existing threshold definitions:</i></p>
</div>
<div style="text-align: right;">
<div style="text-align: right; margin-bottom: 15px;">
<div class="input input-text" id="input_selected_key">
<label>Click on any table's row to fill Key ID:</label>
<label>Click on any row to fill the Key ID:</label>
</div>
<div class="form-submit" id="btn_remove_content">
<button class="btn btn-primary submit">Delete this entry</button>
Expand All @@ -281,22 +281,22 @@ <h3 style="color: indianred;">The threshold table shows per server threshold cur
<label>Enter the host:</label>
</div>
<div class="input input-text" id="input_modify_alert_cpu_max_percent">
<label>alert_cpu_max_percent:</label>
<label>cpu max (%):</label>
</div>
<div class="input input-text" id="input_modify_alert_cpu_min_time_seconds">
<label>alert_cpu_min_time_seconds:</label>
<label>cpu min time (sec):</label>
</div>
<div class="input input-text" id="input_modify_alert_physical_memory_max_percent">
<label>alert_physical_memory_max_percent:</label>
<label>physical memory max (%):</label>
</div>
<div class="input input-text" id="input_modify_alert_physical_memory_min_time_seconds">
<label>alert_physical_memory_min_time_seconds:</label>
<label>physical memory min time (sec):</label>
</div>
<div class="input input-text" id="input_modify_alert_virtual_memory_max_percent">
<label>alert_virtual_memory_max_percent:</label>
<label>virtual memory max (%):</label>
</div>
<div class="input input-text" id="input_modify_alert_virtual_memory_min_time_seconds">
<label>alert_virtual_memory_min_time_seconds:</label>
<label>virtual memory min time (sec):</label>
</div>
<div class="form-submit" id="btn_modify_content">
<button class="btn btn-primary submit">Modify this entry</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h3 style="color: indianred;"><b>alert max value is in percentage and min time i
<label>Enter the host:</label>
</div>
<div class="input input-text" id="input_add_mount">
<label>Enter the mount point to be exluded:</label>
<label>Enter the mount point:</label>
</div>
<div class="input input-text" id="input_add_alert_fs_max_percent">
<label>alert_fs_max_percent:</label>
Expand Down Expand Up @@ -265,9 +265,9 @@ <h3 style="color: indianred;">The threshold table shows per server threshold cur
<hr>
<p style="color: gray;"><i>Remove or modify existing threshold definitions:</i></p>
</div>
<div style="text-align: right;">
<div style="text-align: right; margin-bottom: 15px;">
<div class="input input-text" id="input_selected_key">
<label>Click on any table's row to fill Key ID:</label>
<label>Click on any row to fill the Key ID:</label>
</div>
<div class="form-submit" id="btn_remove_content">
<button class="btn btn-primary submit">Delete this entry</button>
Expand Down
6 changes: 3 additions & 3 deletions nmon/default/data/ui/html/Manage_file_systems_exclusion.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is
<p style="color: gray;"><i>Remove or modify exclusions:</i></p>
</div>

<div style="text-align: right;">
<div style="text-align: right; margin-bottom: 15px;">
<div class="input input-text" id="input_selected_key">
<label>Click on any table's row to fill Key ID:</label>
<label>Click on any row to fill the Key ID:</label>
</div>
<div class="form-submit" id="btn_remove_content">
<button class="btn btn-primary submit">Delete this entry</button>
Expand Down Expand Up @@ -250,7 +250,7 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is
<label>Enter the host:</label>
</div>
<div class="input input-text" id="input_add_mount">
<label>Enter the mount point to be exluded:</label>
<label>Enter the mount point:</label>
</div>
<div class="form-submit" id="btn_add_content">
<button class="btn btn-primary submit">Add this entry</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,21 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is
<hr>
<p style="color: gray;"><i>Add, remove or modify exclusions:</i></p>
</div>
<div style="text-align: right;">
<div style="text-align: right; margin-bottom: 15px;">
<div class="form-submit" id="btn_add_content">
<button class="btn btn-primary submit">Add a new file-system exclusion</button>
<br /><br />
</div>
</div>
<div style="text-align: right;">
<div style="text-align: right; margin-bottom: 15px;">
<div class="input input-text" id="input_selected_key">
<label>Click on any table's row to fill Key ID:</label>
<label>Click on any row to fill the Key ID:</label>
</div>
<div class="form-submit" id="btn_remove_content">
<button class="btn btn-primary submit">Delete the selected entry</button>
</div>
</div>
<div style="text-align: right;">
<div style="text-align: right; margin-bottom: 15px;">
<div class="input input-text" id="input_modify_mount">
<label>Enter the mount point:</label>
</div>
Expand Down Expand Up @@ -618,7 +618,7 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is
submitTokens();

// When the Submit button is clicked, open prompt
bootbox.prompt("Please enter the new mount point to be excluded: <br /><i style=\"color: indianred;\">You can use wildcards to match multiple file-systems at once, and case is insensitive</i>", function(result){
bootbox.prompt("Please enter the new mount point to be excluded: <br /><br /><i style=\"color: indianred;\">You can use wildcards to match multiple file-systems at once, and case is insensitive</i>", function(result){

if (result) {

Expand Down Expand Up @@ -653,6 +653,10 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is
});
}

else {
bootbox.alert("<h3 style=\"color: indianred;\">Error: Your entry is invalid or empty !</h3>");
}

})

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is
<br /><br />
</div>
</div>
<div style="text-align: right;">
<div style="text-align: right; margin-bottom: 15px;">
<div class="input input-text" id="input_selected_key">
<label>Click on any table's row to fill Key ID:</label>
<label>Click on any row to fill the Key ID:</label>
</div>
<div class="form-submit" id="btn_remove_content">
<button class="btn btn-primary submit">Delete the selected entry</button>
Expand Down Expand Up @@ -705,11 +705,18 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is

// Create a dictionary to store the field names and values
var frameID = result;
var frameID_lgn = result.length;

}

if (!frameID_lgn>0) {
bootbox.alert("<h3 style=\"color: indianred;\">Error: Your entry is invalid or empty !</h3>");
}

else {

// When the Submit button is clicked, open prompt
bootbox.prompt("Please enter the new mount point to be excluded: <br /><i style=\"color: indianred;\">You can use wildcards to match multiple file-systems at once, and case is insensitive</i>", function(result){
bootbox.prompt("Please enter the new mount point to be excluded: <br /> <br /><i style=\"color: indianred;\">You can use wildcards to match multiple file-systems at once, and case is insensitive</i>", function(result){

if (result) {

Expand All @@ -718,37 +725,52 @@ <h3 style="color: indianred;">You can add a new exclusion entry, mount point is

// Create a dictionary to store the field names and values
var mount = result;
var mount_lgn = result.length;

}

// Create a dictionary to store the field names and values
var record = {
"frameID": frameID,
"mount": mount,
"exclude": "true"
}
if (!mount_lgn>0) {
bootbox.alert("<h3 style=\"color: indianred;\">Error: Your entry is invalid or empty !</h3>");
}

// Use the request method to send a REST POST request
// to the storage/collections/data/{collection}/ endpoint
service.request(
"storage/collections/data/kv_nmon_alerting_filesystem_template_exclusion/",
"POST",
null,
null,
JSON.stringify(record),
{"Content-Type": "application/json"},
null)
.done(function() {
// Run the search again to update the table
search1.startSearch();
search2.startSearch();
search3.startSearch();
search4.startSearch();
else {

// Create a dictionary to store the field names and values
var record = {
"frameID": frameID,
"mount": mount,
"exclude": "true"
}

if (frameID_lgn>0 && mount_lgn>0) {

// Use the request method to send a REST POST request
// to the storage/collections/data/{collection}/ endpoint
service.request(
"storage/collections/data/kv_nmon_alerting_filesystem_template_exclusion/",
"POST",
null,
null,
JSON.stringify(record),
{"Content-Type": "application/json"},
null)
.done(function() {
// Run the search again to update the table
search1.startSearch();
search2.startSearch();
search3.startSearch();
search4.startSearch();

});

}

});
}

})

}

})

});
Expand Down
2 changes: 1 addition & 1 deletion nmon/default/data/ui/html/Manage_frameID_mapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h3 style="color: indianred;">The table shows frameID mapping entries currently
</div>
<div style="text-align: right;">
<div class="input input-text" id="input_selected_key">
<label>Click on any table's row to fill Key ID:</label>
<label>Click on any row to fill the Key ID:</label>
</div>
<div class="form-submit" id="btn_remove_content">
<button class="btn btn-primary submit">Delete this entry</button>
Expand Down

0 comments on commit e6c93d7

Please sign in to comment.