Repository: qpid-dispatch Updated Branches: refs/heads/master ec71b2edf -> a92102543
DISPATCH-489 Don't pass type into GET-LOG method request Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/a9210254 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/a9210254 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/a9210254 Branch: refs/heads/master Commit: a921025439450b9b894c70883dc3e22fb609d926 Parents: ec71b2e Author: Ernest Allen <eal...@redhat.com> Authored: Tue Aug 30 09:51:30 2016 -0400 Committer: Ernest Allen <eal...@redhat.com> Committed: Tue Aug 30 09:51:30 2016 -0400 ---------------------------------------------------------------------- console/stand-alone/plugin/html/qdrList.html | 32 +++++++++++++---------- console/stand-alone/plugin/js/qdrList.js | 11 ++++---- console/stand-alone/plugin/js/qdrService.js | 8 +++--- 3 files changed, 29 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a9210254/console/stand-alone/plugin/html/qdrList.html ---------------------------------------------------------------------- diff --git a/console/stand-alone/plugin/html/qdrList.html b/console/stand-alone/plugin/html/qdrList.html index 9d1379e..0033675 100644 --- a/console/stand-alone/plugin/html/qdrList.html +++ b/console/stand-alone/plugin/html/qdrList.html @@ -69,20 +69,24 @@ under the License. </fieldset> </div> <div ng-show="currentMode.id === 'log'"> - <table class="log-entry" ng-repeat="entry in logResults track by $index"> - <tr> - <td align="left" colspan="2">{{entry.time}}</td> - </tr> - <tr> - <td>Type</td><td>{{entry.type}}</td> - </tr> - <tr> - <td>Source</td><td>{{entry.source}}:{{entry.line}}</td> - </tr> - <tr> - <td valign="middle">Message</td><td valign="middle"><pre>{{entry.message}}</pre></td> - </tr> - </table> + <div ng-if="logResults.length > 0"> + <table class="log-entry" ng-repeat="entry in logResults track by $index"> + <tr> + <td align="left" colspan="2">{{entry.time}}</td> + </tr> + <tr> + <td>Type</td><td>{{entry.type}}</td> + </tr> + <tr> + <td>Source</td><td>{{entry.source}}:{{entry.line}}</td> + </tr> + <tr> + <td valign="middle">Message</td><td valign="middle"><pre>{{entry.message}}</pre></td> + </tr> + </table> + </div> + <div ng-if="logResults.length == 0 && !fetchingLog">No log entries for {{selectedRecordName}}</div> + <div ng-if="fetchingLog">Fetching logs for {{selectedRecordName}}</div> </div> </div> </script> http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a9210254/console/stand-alone/plugin/js/qdrList.js ---------------------------------------------------------------------- diff --git a/console/stand-alone/plugin/js/qdrList.js b/console/stand-alone/plugin/js/qdrList.js index ea531cd..6a9f413 100644 --- a/console/stand-alone/plugin/js/qdrList.js +++ b/console/stand-alone/plugin/js/qdrList.js @@ -84,14 +84,15 @@ var QDR = (function(QDR) { $scope.isModeSelected = function (mode) { return mode === $scope.currentMode; } + $scope.fetchingLog = false; $scope.selectMode = function (mode) { $scope.currentMode = mode; if (mode.id === 'log') { - $scope.logResults = "getting recent log entries..."; - attrs = { - name: $scope.selectedRecordName - } - QDRService.sendMethod($scope.currentNode.id, $scope.selectedEntity, attrs, $scope.currentMode.op, function (nodeName, entity, response, context) { + $scope.logResults = []; + $scope.fetchingLog = true; + var entity; // undefined since it is not supported in the GET-LOG call + QDRService.sendMethod($scope.currentNode.id, entity, {}, $scope.currentMode.op, function (nodeName, entity, response, context) { + $scope.fetchingLog = false; var statusCode = context.message.application_properties.statusCode; if (statusCode < 200 || statusCode >= 300) { Core.notification('error', context.message.application_properties.statusDescription); http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a9210254/console/stand-alone/plugin/js/qdrService.js ---------------------------------------------------------------------- diff --git a/console/stand-alone/plugin/js/qdrService.js b/console/stand-alone/plugin/js/qdrService.js index 0293f48..bcfd1ad 100644 --- a/console/stand-alone/plugin/js/qdrService.js +++ b/console/stand-alone/plugin/js/qdrService.js @@ -712,9 +712,11 @@ var QDR = (function(QDR) { var application_properties = { operation: operation } - var ent = self.schema.entityTypes[entity]; - var fullyQualifiedType = ent ? ent.fullyQualifiedType : entity; - application_properties.type = fullyQualifiedType || entity; + if (entity) { + var ent = self.schema.entityTypes[entity]; + var fullyQualifiedType = ent ? ent.fullyQualifiedType : entity; + application_properties.type = fullyQualifiedType || entity; + } if (attrs.name) application_properties.name = attrs.name; var msg = { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org