You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2018/09/11 16:56:44 UTC

qpid-dispatch git commit: DISPATCH-1109 - Use window.location for default values in the connect form.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master df7667e8a -> 379036ee2


DISPATCH-1109 - Use window.location for default values in the connect form.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/379036ee
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/379036ee
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/379036ee

Branch: refs/heads/master
Commit: 379036ee2ef02da40b515372e791df572a490554
Parents: df7667e
Author: Ted Ross <tr...@redhat.com>
Authored: Tue Sep 11 10:52:32 2018 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Tue Sep 11 10:52:32 2018 -0400

----------------------------------------------------------------------
 console/stand-alone/plugin/html/qdrConnect.html | 8 ++++----
 console/stand-alone/plugin/js/qdrSettings.js    | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/379036ee/console/stand-alone/plugin/html/qdrConnect.html
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/html/qdrConnect.html b/console/stand-alone/plugin/html/qdrConnect.html
index b3500c4..7c31e38 100644
--- a/console/stand-alone/plugin/html/qdrConnect.html
+++ b/console/stand-alone/plugin/html/qdrConnect.html
@@ -35,7 +35,7 @@ under the License.
         <div class="col-xs-10">
             <div class="alert alert-success">
                     <p>
-                        Enter the address and a HTML-enabled port of a <strong><a href="http://qpid.apache.org/components/dispatch-router/" target="_blank">Qpid Dispatch Router</a></strong>.
+                        Enter the address and an HTTP-enabled port of a <strong><a href="http://qpid.apache.org/components/dispatch-router/" target="_blank">Qpid Dispatch Router</a></strong>.
                     </p>
                     <!--
                     <p>
@@ -48,12 +48,12 @@ under the License.
                         <div class="form-group">
                             <label class="col-md-2 control-label" for="address">Address: </label>
                             <div class="col-md-6">
-                                <input tabindex="1" id="address" type="text" ng-model="formEntity.address" placeholder="localhost" name="address" autofocus="autofocus" class="ng-pristine ng-valid ng-valid-required"></div>
+                                <input tabindex="1" id="address" type="text" ng-model="formEntity.address" placeholder="{{formEntity.address}}" name="address" autofocus="autofocus" class="ng-pristine ng-valid ng-valid-required"></div>
                         </div>
                         <div class="form-group">
-                            <label tabindex="-1" class="col-md-2 control-label" title="Ports to connect to, by default 5673" for="port">Port: </label>
+                            <label tabindex="-1" class="col-md-2 control-label" title="Port to connect to, by default 5673" for="port">Port: </label>
                             <div class="col-md-6">
-                                <input tabindex="2" id="port" posint type="number" placeholder="5673" tooltip="Ports to connect to, by default 5673" ng-model="formEntity.port" name="port" title="Ports to connect to, by default 5673">
+                                <input tabindex="2" id="port" posint type="number" placeholder="{{formEntity.port}}" tooltip="Port to connect to, by default 5673" ng-model="formEntity.port" name="port" title="Ports to connect to, by default 5673">
                                 <span ng-show="settings.port.$error.range">Must be 1 through 65535</span>
                             </div>
                         </div>

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/379036ee/console/stand-alone/plugin/js/qdrSettings.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrSettings.js b/console/stand-alone/plugin/js/qdrSettings.js
index 2d0e01b..2453a95 100644
--- a/console/stand-alone/plugin/js/qdrSettings.js
+++ b/console/stand-alone/plugin/js/qdrSettings.js
@@ -30,8 +30,8 @@ export class SettingsController {
     $scope.forms = {};
 
     $scope.formEntity = angular.fromJson(localStorage[QDR_SETTINGS_KEY]) || {
-      address: '',
-      port: '',
+      address: window.location.hostname,
+      port: Number(window.location.port),
       username: '',
       password: '',
       autostart: false
@@ -77,9 +77,9 @@ export class SettingsController {
     var doConnect = function() {
       QDRLog.info('doConnect called on connect page');
       if (!$scope.formEntity.address)
-        $scope.formEntity.address = 'localhost';
+        $scope.formEntity.address = window.location.hostname;
       if (!$scope.formEntity.port)
-        $scope.formEntity.port = 5673;
+        $scope.formEntity.port = Number(window.location.port);
 
       var failed = function() {
         $timeout(function() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org