1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 13:55:31 +03:00

Merge pull request #41 from ansible/add_cmd_host_event_list

Adding command and warning displays in Event Detail modals
This commit is contained in:
jlmitch5 2015-01-28 09:45:19 -05:00
commit acb061f0be
2 changed files with 157 additions and 137 deletions

View File

@ -461,7 +461,7 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
}
function parseJSON(obj) {
var h, html = '', key, keys, found = false;
var h, html = '', key, keys, found = false, string_warnings = "", string_cmd = "";
if (typeof obj === "object") {
html += "<table class=\"table eventviewer-status\">\n";
html += "<tbody>\n";
@ -486,7 +486,7 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
h = '';
if (key !== 'host_id' && key !== 'parent' && key !== 'event' && key !== 'src' && key !== 'md5sum' &&
key !== 'stdout' && key !== 'traceback' && key !== 'stderr' && key !== 'cmd' && key !=='changed' && key !== "verbose_override" &&
key !== 'feature_result') {
key !== 'feature_result' && key !== 'warnings') {
if (!EventsViewerForm.fields[key]) {
h = parseItem(obj[key], key, key);
if (h) {
@ -494,6 +494,26 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo
found = true;
}
}
} else if (key === 'cmd') {
// only show cmd if it's a cmd that was run
if (!EventsViewerForm.fields[key] && obj[key].length > 0) {
// include the label head Shell Command instead of CMD in the modal
string_cmd += obj[key].join(" ");
h = parseItem(string_cmd, key, "Shell Command");
if (h) {
html += h;
found = true;
}
}
} else if (key === 'warnings') {
if (!EventsViewerForm.fields[key] && obj[key].length > 0) {
string_warnings += obj[key].join(" ");
h = parseItem(string_warnings, key, "Warnings");
if (h) {
html += h;
found = true;
}
}
}
}
}

View File

@ -44,142 +44,142 @@
<script src="{{ STATIC_URL }}lib/angular-scheduler/lib/angular-scheduler.min.js"></script>
{% if settings.USE_MINIFIED_JS %}
<script src="{{ STATIC_URL }}js/awx.min.js"></script>
<script src="{{ STATIC_URL }}js/awx.min.js"></script>
{% else %}
<script src="{{ STATIC_URL }}lib/less.js/dist/less-1.6.2.min.js"></script>
<script src="{{ STATIC_URL }}js/app.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/AuthService.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/RestServices.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Utilities.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/form-generator.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/list-generator.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/prompt-dialog.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/generator-helpers.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/directives.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/filters.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/api-loader.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/pwdmeter.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/InventoryTree.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Timer.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Modal.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Socket.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Authentication.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Organizations.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Users.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Admins.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Inventories.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Home.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Teams.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Sockets.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Projects.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/controllers/JobDetail.js"></script>
<script src="{{ STATIC_URL }}js/controllers/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/controllers/JobStdout.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Portal.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Schedules.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Sockets.js"></script>
<script src="{{ STATIC_URL }}js/forms/Users.js"></script>
<script src="{{ STATIC_URL }}js/forms/Organizations.js"></script>
<script src="{{ STATIC_URL }}js/forms/Inventories.js"></script>
<script src="{{ STATIC_URL }}js/forms/InventoryStatus.js"></script>
<script src="{{ STATIC_URL }}js/forms/Teams.js"></script>
<script src="{{ STATIC_URL }}js/forms/Hosts.js"></script>
<script src="{{ STATIC_URL }}js/forms/Groups.js"></script>
<script src="{{ STATIC_URL }}js/forms/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/forms/CustomInventory.js"></script>
<script src="{{ STATIC_URL }}js/forms/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/forms/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/forms/Projects.js"></script>
<script src="{{ STATIC_URL }}js/forms/ProjectStatus.js"></script>
<script src="{{ STATIC_URL }}js/forms/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/forms/EventsViewer.js"></script>
<script src="{{ STATIC_URL }}js/forms/HostGroups.js"></script>
<script src="{{ STATIC_URL }}js/forms/ActivityDetail.js"></script>
<script src="{{ STATIC_URL }}js/forms/JobSummary.js"></script>
<script src="{{ STATIC_URL }}js/forms/JobVarsPrompt.js"></script>
<script src="{{ STATIC_URL }}js/forms/LicenseForm.js"></script>
<script src="{{ STATIC_URL }}js/forms/LicenseUpdate.js"></script>
<script src="{{ STATIC_URL }}js/forms/Source.js"></script>
<script src="{{ STATIC_URL }}js/forms/SurveyQuestion.js"></script>
<script src="{{ STATIC_URL }}js/forms/LogViewerStatus.js"></script>
<script src="{{ STATIC_URL }}js/forms/LogViewerOptions.js"></script>
<script src="{{ STATIC_URL }}js/lists/Users.js"></script>
<script src="{{ STATIC_URL }}js/lists/ConfigureTowerJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/Organizations.js"></script>
<script src="{{ STATIC_URL }}js/lists/Admins.js"></script>
<script src="{{ STATIC_URL }}js/lists/Inventories.js"></script>
<script src="{{ STATIC_URL }}js/lists/Teams.js"></script>
<script src="{{ STATIC_URL }}js/lists/InventoryGroups.js"></script>
<script src="{{ STATIC_URL }}js/lists/InventoryHosts.js"></script>
<script src="{{ STATIC_URL }}js/lists/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/lists/CustomInventory.js"></script>
<script src="{{ STATIC_URL }}js/lists/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/lists/PortalJobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/lists/Projects.js"></script>
<script src="{{ STATIC_URL }}js/lists/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/PortalJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/CompletedJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/RunningJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/QueuedJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/lists/Streams.js"></script>
<script src="{{ STATIC_URL }}js/lists/HomeGroups.js"></script>
<script src="{{ STATIC_URL }}js/lists/HomeHosts.js"></script>
<script src="{{ STATIC_URL }}js/lists/Groups.js"></script>
<script src="{{ STATIC_URL }}js/lists/Hosts.js"></script>
<script src="{{ STATIC_URL }}js/lists/Schedules.js"></script>
<script src="{{ STATIC_URL }}js/lists/ScheduledJobs.js"></script>
<script src="{{ STATIC_URL }}js/helpers/SocketHelper.js"></script>
<script src="{{ STATIC_URL }}js/helpers/LoadConfig.js"></script>
<script src="{{ STATIC_URL }}js/helpers/ConfigureTower.js"></script>
<script src="{{ STATIC_URL }}js/helpers/CustomInventory.js"></script>
<script src="{{ STATIC_URL }}js/helpers/refresh-related.js"></script>
<script src="{{ STATIC_URL }}js/helpers/related-search.js"></script>
<script src="{{ STATIC_URL }}js/helpers/refresh.js"></script>
<script src="{{ STATIC_URL }}js/helpers/search.js"></script>
<script src="{{ STATIC_URL }}js/helpers/PaginationHelpers.js"></script>
<script src="{{ STATIC_URL }}js/helpers/inventory.js"></script>
<script src="{{ STATIC_URL }}js/helpers/teams.js"></script>
<script src="{{ STATIC_URL }}js/helpers/JobSubmission.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Lookup.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Parse.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Children.js"></script>
<script src="{{ STATIC_URL }}js/helpers/ProjectPath.js"></script>
<script src="{{ STATIC_URL }}js/helpers/md5.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Access.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Selection.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Projects.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Users.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Groups.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Hosts.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Variables.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Schedules.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Survey.js"></script>
<script src="{{ STATIC_URL }}js/helpers/LogViewer.js"></script>
<script src="{{ STATIC_URL }}js/helpers/EventViewer.js"></script>
<script src="{{ STATIC_URL }}js/helpers/JobDetail.js"></script>
<script src="{{ STATIC_URL }}js/helpers/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/helpers/HostEventsViewer.js"></script>
<script src="{{ STATIC_URL }}js/helpers/License.js"></script>
<script src="{{ STATIC_URL }}js/helpers/AboutAnsible.js"></script>
<script src="{{ STATIC_URL }}js/widgets/JobStatus.js"></script>
<script src="{{ STATIC_URL }}js/widgets/DashboardCounts.js"></script>
<script src="{{ STATIC_URL }}js/widgets/HostPieChart.js"></script>
<script src="{{ STATIC_URL }}js/widgets/HostGraph.js"></script>
<script src="{{ STATIC_URL }}js/widgets/JobStatusGraph.js"></script>
<script src="{{ STATIC_URL }}js/widgets/DashboardJobs.js"></script>
<script src="{{ STATIC_URL }}js/widgets/PortalJobs.js"></script>
<script src="{{ STATIC_URL }}js/widgets/Stream.js"></script>
<script src="{{ STATIC_URL }}js/help/InventoryGroups.js"></script>
<script src="{{ STATIC_URL }}js/help/FirefoxSocketHelp.js"></script>
<script src="{{ STATIC_URL }}js/help/SafariSocketHelp.js"></script>
<script src="{{ STATIC_URL }}js/help/ChromeSocketHelp.js"></script>
<script src="{{ STATIC_URL }}lib/less.js/dist/less-1.6.2.min.js"></script>
<script src="{{ STATIC_URL }}js/app.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/AuthService.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/RestServices.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Utilities.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/form-generator.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/list-generator.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/prompt-dialog.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/generator-helpers.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/directives.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/filters.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/api-loader.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/pwdmeter.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/InventoryTree.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Timer.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Modal.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/Socket.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Authentication.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Organizations.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Users.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Admins.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Inventories.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Home.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Teams.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Sockets.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Projects.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/controllers/JobDetail.js"></script>
<script src="{{ STATIC_URL }}js/controllers/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/controllers/JobStdout.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Portal.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Schedules.js"></script>
<script src="{{ STATIC_URL }}js/controllers/Sockets.js"></script>
<script src="{{ STATIC_URL }}js/forms/Users.js"></script>
<script src="{{ STATIC_URL }}js/forms/Organizations.js"></script>
<script src="{{ STATIC_URL }}js/forms/Inventories.js"></script>
<script src="{{ STATIC_URL }}js/forms/InventoryStatus.js"></script>
<script src="{{ STATIC_URL }}js/forms/Teams.js"></script>
<script src="{{ STATIC_URL }}js/forms/Hosts.js"></script>
<script src="{{ STATIC_URL }}js/forms/Groups.js"></script>
<script src="{{ STATIC_URL }}js/forms/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/forms/CustomInventory.js"></script>
<script src="{{ STATIC_URL }}js/forms/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/forms/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/forms/Projects.js"></script>
<script src="{{ STATIC_URL }}js/forms/ProjectStatus.js"></script>
<script src="{{ STATIC_URL }}js/forms/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/forms/EventsViewer.js"></script>
<script src="{{ STATIC_URL }}js/forms/HostGroups.js"></script>
<script src="{{ STATIC_URL }}js/forms/ActivityDetail.js"></script>
<script src="{{ STATIC_URL }}js/forms/JobSummary.js"></script>
<script src="{{ STATIC_URL }}js/forms/JobVarsPrompt.js"></script>
<script src="{{ STATIC_URL }}js/forms/LicenseForm.js"></script>
<script src="{{ STATIC_URL }}js/forms/LicenseUpdate.js"></script>
<script src="{{ STATIC_URL }}js/forms/Source.js"></script>
<script src="{{ STATIC_URL }}js/forms/SurveyQuestion.js"></script>
<script src="{{ STATIC_URL }}js/forms/LogViewerStatus.js"></script>
<script src="{{ STATIC_URL }}js/forms/LogViewerOptions.js"></script>
<script src="{{ STATIC_URL }}js/lists/Users.js"></script>
<script src="{{ STATIC_URL }}js/lists/ConfigureTowerJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/Organizations.js"></script>
<script src="{{ STATIC_URL }}js/lists/Admins.js"></script>
<script src="{{ STATIC_URL }}js/lists/Inventories.js"></script>
<script src="{{ STATIC_URL }}js/lists/Teams.js"></script>
<script src="{{ STATIC_URL }}js/lists/InventoryGroups.js"></script>
<script src="{{ STATIC_URL }}js/lists/InventoryHosts.js"></script>
<script src="{{ STATIC_URL }}js/lists/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/lists/CustomInventory.js"></script>
<script src="{{ STATIC_URL }}js/lists/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/lists/PortalJobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/lists/Projects.js"></script>
<script src="{{ STATIC_URL }}js/lists/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/PortalJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/CompletedJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/RunningJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/QueuedJobs.js"></script>
<script src="{{ STATIC_URL }}js/lists/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/lists/Streams.js"></script>
<script src="{{ STATIC_URL }}js/lists/HomeGroups.js"></script>
<script src="{{ STATIC_URL }}js/lists/HomeHosts.js"></script>
<script src="{{ STATIC_URL }}js/lists/Groups.js"></script>
<script src="{{ STATIC_URL }}js/lists/Hosts.js"></script>
<script src="{{ STATIC_URL }}js/lists/Schedules.js"></script>
<script src="{{ STATIC_URL }}js/lists/ScheduledJobs.js"></script>
<script src="{{ STATIC_URL }}js/helpers/SocketHelper.js"></script>
<script src="{{ STATIC_URL }}js/helpers/LoadConfig.js"></script>
<script src="{{ STATIC_URL }}js/helpers/ConfigureTower.js"></script>
<script src="{{ STATIC_URL }}js/helpers/CustomInventory.js"></script>
<script src="{{ STATIC_URL }}js/helpers/refresh-related.js"></script>
<script src="{{ STATIC_URL }}js/helpers/related-search.js"></script>
<script src="{{ STATIC_URL }}js/helpers/refresh.js"></script>
<script src="{{ STATIC_URL }}js/helpers/search.js"></script>
<script src="{{ STATIC_URL }}js/helpers/PaginationHelpers.js"></script>
<script src="{{ STATIC_URL }}js/helpers/inventory.js"></script>
<script src="{{ STATIC_URL }}js/helpers/teams.js"></script>
<script src="{{ STATIC_URL }}js/helpers/JobSubmission.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Lookup.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Parse.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Children.js"></script>
<script src="{{ STATIC_URL }}js/helpers/ProjectPath.js"></script>
<script src="{{ STATIC_URL }}js/helpers/md5.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Access.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Selection.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Projects.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Users.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Jobs.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Credentials.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Permissions.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Groups.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Hosts.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Variables.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Schedules.js"></script>
<script src="{{ STATIC_URL }}js/helpers/Survey.js"></script>
<script src="{{ STATIC_URL }}js/helpers/LogViewer.js"></script>
<script src="{{ STATIC_URL }}js/helpers/EventViewer.js"></script>
<script src="{{ STATIC_URL }}js/helpers/JobDetail.js"></script>
<script src="{{ STATIC_URL }}js/helpers/JobTemplates.js"></script>
<script src="{{ STATIC_URL }}js/helpers/HostEventsViewer.js"></script>
<script src="{{ STATIC_URL }}js/helpers/License.js"></script>
<script src="{{ STATIC_URL }}js/helpers/AboutAnsible.js"></script>
<script src="{{ STATIC_URL }}js/widgets/JobStatus.js"></script>
<script src="{{ STATIC_URL }}js/widgets/DashboardCounts.js"></script>
<script src="{{ STATIC_URL }}js/widgets/HostPieChart.js"></script>
<script src="{{ STATIC_URL }}js/widgets/HostGraph.js"></script>
<script src="{{ STATIC_URL }}js/widgets/JobStatusGraph.js"></script>
<script src="{{ STATIC_URL }}js/widgets/DashboardJobs.js"></script>
<script src="{{ STATIC_URL }}js/widgets/PortalJobs.js"></script>
<script src="{{ STATIC_URL }}js/widgets/Stream.js"></script>
<script src="{{ STATIC_URL }}js/help/InventoryGroups.js"></script>
<script src="{{ STATIC_URL }}js/help/FirefoxSocketHelp.js"></script>
<script src="{{ STATIC_URL }}js/help/SafariSocketHelp.js"></script>
<script src="{{ STATIC_URL }}js/help/ChromeSocketHelp.js"></script>
{% endif %}
</head>