You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2017/09/27 18:56:36 UTC

qpid-dispatch git commit: DISPATCH-833 Removed 'Add New Router' mode from hawtio console

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 7817694e2 -> cc3f124d6


DISPATCH-833 Removed 'Add New Router' mode from hawtio console


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

Branch: refs/heads/master
Commit: cc3f124d6f83ddc7c2d4ae1529475e73fb16807f
Parents: 7817694
Author: Ernest Allen <ea...@redhat.com>
Authored: Wed Sep 27 14:56:16 2017 -0400
Committer: Ernest Allen <ea...@redhat.com>
Committed: Wed Sep 27 14:56:16 2017 -0400

----------------------------------------------------------------------
 LICENSE                                         |  12 -
 .../main/webapp/plugin/html/qdrTopology.html    | 135 +-----
 .../src/main/webapp/plugin/js/qdrNewNode.js     | 445 -------------------
 .../src/main/webapp/plugin/js/qdrTopology.js    | 273 +-----------
 .../src/main/webapp/plugin/lib/FileSaver.min.js |   7 -
 5 files changed, 2 insertions(+), 870 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cc3f124d/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index c5d9b24..bbdda2e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -381,18 +381,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 
-console/hawtio/src/main/webapp/plugin/lib/FileSaver.min.js is licensed under the MIT license
-The MIT License
-
-Copyright ? 2016 Eli Grey.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
 The following 3 files are covered by the SIL OFL 1.1
 console/hawtio/src/main/webapp/plugin/fonts/fontawesome-webfont.woff
 console/hawtio/src/main/webapp/plugin/fonts/fontawesome-webfont.woff2

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cc3f124d/console/hawtio/src/main/webapp/plugin/html/qdrTopology.html
----------------------------------------------------------------------
diff --git a/console/hawtio/src/main/webapp/plugin/html/qdrTopology.html b/console/hawtio/src/main/webapp/plugin/html/qdrTopology.html
index 31afe1f..496d2ac 100644
--- a/console/hawtio/src/main/webapp/plugin/html/qdrTopology.html
+++ b/console/hawtio/src/main/webapp/plugin/html/qdrTopology.html
@@ -28,51 +28,19 @@ under the License.
                 <h4>Connection Info</h4>
                 <div class="gridStyle" ng-grid="topoGridOptions"></div>
             </div>
-            <div id="addNodeForm" ng-show="form == 'add'">
-                <h4>Add a new router</h4>
-                <ul>
-                    <li>Click on an existing router to create a connection to the new router</li>
-                    <li>Double-click on the new router to <button ng-click="editNewRouter()">edit</button> its properties</li>
-                    <li ng-show="addingNode.hasLink" >Right-click on a new connection to edit its properties</li>
-                </ul>
-                <button ng-click="cancel()">Cancel</button>
-            </div>
         </div>
         <button ng-if="panelVisible" ng-click="hideLeftPane()" class="hideLeft" title="Hide"><i class="icon-step-backward"></i></button>
         <button ng-if="!panelVisible" ng-click="showLeftPane()" class="hideLeft" title="Show"><i class="icon-step-forward"></i></button>
     </div>
     <div class="panel-adjacent">
-
-<!--
-        <ul class="nav nav-tabs ng-scope qdrTopoModes">
-            <li ng-repeat="mode in modes" ng-class="{active : isModeActive(mode.name), 'pull-right' : isRight(mode)}" ng-click="selectMode('{{mode.name}}')" >
-                <a data-placement="bottom" class="ng-binding"> {{mode.name}} </a></li>
-        </ul>
--->
-        <div id="topology" ng-show="mode == 'Diagram'"><!-- d3 toplogy here --></div>
-        <div id="geology" ng-show="mode == 'Globe'"><!-- d3 globe here --></div>
+        <div id="topology"><!-- d3 toplogy here --></div>
         <div id="crosssection"><!-- d3 pack here --></div>
-        <!-- <div id="addRouter" ng-show="mode == 'Add Node'"></div> -->
         <div id="node_context_menu" class="contextMenu">
             <ul>
-                <li class="na" ng-class="{new: contextNode.cls == 'temp'}" ng-click="addingNode.trigger = 'editNode'">Edit...</li>
-                <li class="na" ng-class="{adding: addingNode.step > 0}" ng-click="addingNode.step = 0">Cancel add</li>
-                <li class="context-separator"></li>
                 <li class="na" ng-class="{'force-display': !isFixed()}" ng-click="setFixed(true)">Freeze in place</li>
                 <li class="na" ng-class="{'force-display': isFixed()}" ng-click="setFixed(false)">Unfreeze</li>
             </ul>
         </div>
-        <div id="svg_context_menu" class="contextMenu">
-            <ul>
-                <li ng-click="addingNode.step = 2">Add a new router</li>
-            </ul>
-        </div>
-        <div id="link_context_menu" class="contextMenu">
-            <ul>
-                <li ng-click="reverseLink()">Reverse connection direction</li>
-                <li ng-click="removeLink()">Remove connection</li>
-            </ul>
-        </div>
         <div id="svg_legend"></div>
         <div id="multiple_details">
             <h4 class="grid-title">Connections</h4>
@@ -97,104 +65,3 @@ under the License.
 <script type="text/ng-template" id="titleCellTemplate.html">
     <div title="{{row.entity[col.field]}}" class="ngCellText">{{row.entity[col.field]}}</div>
 </script>
-
-<!--
-    This is the template for the node edit dialog that is displayed.
--->
-<script type="text/ng-template" id="node-config-template.html">
-    <div class="modal-header">
-        <h3 class="modal-title">Configure new router</h3>
-    </div>
-    <div class="modal-body">
-        <form novalidate name="editForm">
-
-            <tabset vertical="true" class="tabs-left">
-                <tab ng-repeat="entity in entities"> <!-- ng-class="{separated: entity.tabName == 'listener0'}" -->
-                    <tab-heading>
-                        <i ng-if="entity.icon !== ''" ng-class="entity.icon ? 'ui-icon-arrowthick-1-w' : 'ui-icon-arrowthick-1-e'" class="ui-icon"></i>{{entity.humanName}}
-                    </tab-heading>
-                    <div class="entity-description">{{entity.description}}</div>
-                    <fieldset>
-                        <div ng-mouseenter="showDescription(attribute, $event)" ng-repeat="attribute in entity.attributes">
-                            <label for="{{attribute.name}}">{{attribute.humanName}}</label>
-<!-- we can't do <input type="{angular expression}"> because... jquery throws an exception because... -->
-                            <div ng-if="attribute.input == 'input'">
-                                <!-- ng-pattern="testPattern(attribute)" -->
-                                <input ng-if="attribute.type == 'number'" type="number" name="{{attribute.name}}" id="{{attribute.name}}" ng-model="attribute.value" ng-required="attribute.required" class="ui-widget-content ui-corner-all"/>
-                                <input ng-if="attribute.type == 'text'" type="text" name="{{attribute.name}}" id="{{attribute.name}}" ng-model="attribute.value" ng-required="attribute.required" class="ui-widget-content ui-corner-all"/>
-                            </div>
-                            <div ng-if="attribute.input == 'select'">
-                                <select id="{{attribute.name}}" ng-model="attribute.selected" ng-options="item for item in attribute.rawtype"></select>
-                            </div>
-                            <div ng-if="attribute.input == 'boolean'" class="boolean">
-                                <label><input type="radio" ng-model="attribute.value" value="true"> True</label>
-                                <label><input type="radio" ng-model="attribute.value" value="false"> False</label>
-                            </div>
-                        </div>
-                    </fieldset>
-                    <div class="attr-description">{{attributeDescription}}
-                        <div class="attr-type">{{attributeType}}</div>
-                        <div class="attr-required">{{attributeRequired}}</div>
-                        <div class="attr-unique">{{attributeUnique}}</div>
-                    </div>
-                    <div class="attr-annotations" ng-repeat="annotation in entity.annotatedBy">
-                        <span>You can also enter the <button ng-click="selectAnnotationTab(annotation)">{{annotation}}</button> values.</span>
-                    </div>
-                </tab>
-            </tabset>
-
-
-        </form>
-    </div>
-    <div class="modal-footer">
-        <button class="btn btn-primary" type="button" ng-click="download()">Download</button>
-        <button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
-    </div>
-</script>
-
-<script type="text/ng-template" id="config-file-header.html">##
-## Licensed to the Apache Software Foundation (ASF) under one
-## or more contributor license agreements.  See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership.  The ASF licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License.  You may obtain a copy of the License at
-##
-##   http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing,
-## software distributed under the License is distributed on an
-## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-## KIND, either express or implied.  See the License for the
-## specific language governing permissions and limitations
-## under the License
-##
-</script>
-
-<script type="text/ng-template" id="download-dialog-template.html">
-    <div class="modal-header">
-        <h3 class="modal-title">Configure new router</h3>
-    </div>
-    <div class="modal-body">
-
-        <label title="Show descriptions and default values in confile files"><input type="checkbox" ng-model="verbose"> Verbose output</label>
-        <div>
-            <button ng-click="download()">Download</button>
-            <button class="btn" zero-clipboard data-clipboard-text="{{output}}" title="Copy to clipboard">
-                <i class="icon-copy"></i>
-            </button> configuration file for {{newRouterName}}
-        </div>
-        <div ng-repeat="part in parts">
-            <button ng-click="downloadPart(part)">Download</button>
-            <button class="btn" zero-clipboard data-clipboard-text="{{part.output}}" title="Copy to clipboard">
-                <i class="icon-copy"></i>
-            </button> connector section for {{part.name}}
-        </div>
-
-    </div>
-    <div class="modal-footer">
-        <button class="btn btn-primary" type="button" ng-click="done()">Done</button>
-    </div>
-</script>
-

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cc3f124d/console/hawtio/src/main/webapp/plugin/js/qdrNewNode.js
----------------------------------------------------------------------
diff --git a/console/hawtio/src/main/webapp/plugin/js/qdrNewNode.js b/console/hawtio/src/main/webapp/plugin/js/qdrNewNode.js
deleted file mode 100644
index f6d035a..0000000
--- a/console/hawtio/src/main/webapp/plugin/js/qdrNewNode.js
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-/**
- * @module QDR
- */
-var QDR = (function(QDR) {
-
-  QDR.module.controller("QDR.NodeDialogController", function($scope, QDRService, dialog, newname) {
-    var schema = QDRService.schema;
-    var myEntities = ['router', 'log', 'listener'];
-    var typeMap = {
-      integer: 'number',
-      string: 'text',
-      path: 'text',
-      boolean: 'boolean'
-    };
-    var newLinks = $('path.temp').toArray(); // jquery array of new links for the added router
-    var nodeInfo = QDRService.topology.nodeInfo();
-    var separatedEntities = []; // additional entities required if a link is reversed
-    var myPort = 0,
-      myAddr = '0.0.0.0'; // port and address for new router
-    $scope.entities = [];
-
-    // find max port number that is used in all the listeners
-    var getMaxPort = function(nodeInfo) {
-      var maxPort = 5674;
-      for (var key in nodeInfo) {
-        var node = nodeInfo[key];
-        var listeners = node['.listener'];
-        var attrs = listeners.attributeNames;
-        for (var i = 0; i < listeners.results.length; ++i) {
-          var res = listeners.results[i];
-          var port = QDRService.valFor(attrs, res, 'port');
-          if (parseInt(port, 10) > maxPort)
-            maxPort = parseInt(port, 10);
-        }
-      }
-      return maxPort;
-    }
-    var maxPort = getMaxPort(nodeInfo);
-
-    // construct an object that contains all the info needed for a single tab's fields
-    var entity = function(actualName, tabName, humanName, ent, icon, link) {
-      var nameIndex = -1; // the index into attributes that the name field was placed
-      var index = 0;
-      var info = {
-          actualName: actualName,
-          tabName: tabName,
-          humanName: humanName,
-          description: ent.description,
-          icon: angular.isDefined(icon) ? icon : '',
-          references: ent.references,
-          link: link,
-
-          attributes: $.map(ent.attributes, function(value, key) {
-            // skip identity and depricated fields
-            if (key == 'identity' || value.description.startsWith('Deprecated'))
-              return null;
-            var val = value['default'];
-            if (key == 'name')
-              nameIndex = index;
-            index++;
-            return {
-              name: key,
-              humanName: QDRService.humanify(key),
-              description: value.description,
-              type: typeMap[value.type],
-              rawtype: value.type,
-              input: typeof value.type == 'string' ? value.type == 'boolean' ? 'boolean' : 'input' : 'select',
-              selected: val ? val : undefined,
-              'default': value['default'],
-              value: val,
-              required: value.required,
-              unique: value.unique
-            };
-          })
-        }
-        // move the 'name' attribute to the 1st position
-      if (nameIndex > -1) {
-        var tmp = info.attributes[0];
-        info.attributes[0] = info.attributes[nameIndex];
-        info.attributes[nameIndex] = tmp;
-      }
-      return info;
-    }
-
-    // remove the annotation fields
-    var stripAnnotations = function(entityName, ent, annotations) {
-      if (ent.references) {
-        var newEnt = {
-          attributes: {}
-        };
-        ent.references.forEach(function(annoKey) {
-          if (!annotations[annoKey])
-            annotations[annoKey] = {};
-          annotations[annoKey][entityName] = true; // create the key/consolidate duplicates
-          var keys = Object.keys(schema.annotations[annoKey].attributes);
-          for (var attrib in ent.attributes) {
-            if (keys.indexOf(attrib) == -1) {
-              newEnt.attributes[attrib] = ent.attributes[attrib];
-            }
-          }
-          // add a field for the reference name
-          newEnt.attributes[annoKey] = {
-            type: 'string',
-            description: 'Name of the ' + annoKey + ' section.',
-            'default': annoKey,
-            required: true
-          };
-        })
-        newEnt.references = ent.references;
-        newEnt.description = ent.description;
-        return newEnt;
-      }
-      return ent;
-    }
-
-    var annotations = {};
-    myEntities.forEach(function(entityName) {
-      var ent = schema.entityTypes[entityName];
-      var hName = QDRService.humanify(entityName);
-      if (entityName == 'listener')
-        hName = "Listener for clients";
-      var noAnnotations = stripAnnotations(entityName, ent, annotations);
-      var ediv = entity(entityName, entityName, hName, noAnnotations, undefined);
-      if (ediv.actualName == 'router') {
-        ediv.attributes.filter(function(attr) {
-          return attr.name == 'name'
-        })[0].value = newname;
-        // if we have any new links (connectors), then the router's mode should be interior
-        if (newLinks.length) {
-          var roleAttr = ediv.attributes.filter(function(attr) {
-            return attr.name == 'mode'
-          })[0];
-          roleAttr.value = roleAttr.selected = "interior";
-        }
-      }
-      if (ediv.actualName == 'container') {
-        ediv.attributes.filter(function(attr) {
-          return attr.name == 'containerName'
-        })[0].value = newname + "-container";
-      }
-      if (ediv.actualName == 'listener') {
-        // find max port number that is used in all the listeners
-        ediv.attributes.filter(function(attr) {
-          return attr.name == 'port'
-        })[0].value = ++maxPort;
-      }
-      // special case for required log.module since it doesn't have a default
-      if (ediv.actualName == 'log') {
-        var moduleAttr = ediv.attributes.filter(function(attr) {
-          return attr.name == 'module'
-        })[0];
-        moduleAttr.value = moduleAttr.selected = "DEFAULT";
-      }
-      $scope.entities.push(ediv);
-    })
-
-    // add a tab for each annotation that was found
-    var annotationEnts = [];
-    for (var key in annotations) {
-      ent = angular.copy(schema.annotations[key]);
-      ent.attributes.name = {
-        type: "string",
-        unique: true,
-        description: "Unique name that is used to refer to this set of attributes."
-      }
-      var ediv = entity(key, key + 'tab', QDRService.humanify(key), ent, undefined);
-      ediv.attributes.filter(function(attr) {
-        return attr.name == 'name'
-      })[0].value = key;
-      $scope.entities.push(ediv);
-      annotationEnts.push(ediv);
-    }
-
-    // add an additional listener tab if any links are reversed
-    ent = schema.entityTypes['listener'];
-    newLinks.some(function(link) {
-      if (link.__data__.right) {
-        var noAnnotations = stripAnnotations('listener', ent, annotations);
-        var ediv = entity("listener", "listener0", "Listener (internal)", noAnnotations, undefined);
-        ediv.attributes.filter(function(attr) {
-          return attr.name == 'port'
-        })[0].value = ++maxPort;
-        // connectors from other routers need to connect to this addr:port
-        myPort = maxPort;
-        myAddr = ediv.attributes.filter(function(attr) {
-          return attr.name == 'host'
-        })[0].value
-
-        // override the role. 'normal' is the default, but we want inter-router
-        ediv.attributes.filter(function(attr) {
-          return attr.name == 'role'
-        })[0].selected = 'inter-router';
-        separatedEntities.push(ediv);
-        return true; // stop looping
-      }
-      return false; // continue looping
-    })
-
-    // Add connector tabs for each new link on the topology graph
-    ent = schema.entityTypes['connector'];
-    newLinks.forEach(function(link, i) {
-      var noAnnotations = stripAnnotations('connector', ent, annotations);
-      var ediv = entity('connector', 'connector' + i, " " + link.__data__.source.name, noAnnotations, link.__data__.right, link)
-
-      // override the connector role. 'normal' is the default, but we want inter-router
-      ediv.attributes.filter(function(attr) {
-        return attr.name == 'role'
-      })[0].selected = 'inter-router';
-
-      // find the addr:port of the inter-router listener to use
-      var listener = nodeInfo[link.__data__.source.key]['.listener'];
-      var attrs = listener.attributeNames;
-      for (var i = 0; i < listener.results.length; ++i) {
-        var res = listener.results[i];
-        var role = QDRService.valFor(attrs, res, 'role');
-        if (role == 'inter-router') {
-          ediv.attributes.filter(function(attr) {
-              return attr.name == 'host'
-            })[0].value =
-            QDRService.valFor(attrs, res, 'host')
-          ediv.attributes.filter(function(attr) {
-              return attr.name == 'port'
-            })[0].value =
-            QDRService.valFor(attrs, res, 'port')
-          break;
-        }
-      }
-      if (link.__data__.right) {
-        // connectors from other nodes need to connect to the new router's listener addr:port
-        ediv.attributes.filter(function(attr) {
-          return attr.name == 'port'
-        })[0].value = myPort;
-        ediv.attributes.filter(function(attr) {
-          return attr.name == 'host'
-        })[0].value = myAddr;
-
-        separatedEntities.push(ediv)
-      } else
-        $scope.entities.push(ediv);
-    })
-    Array.prototype.push.apply($scope.entities, separatedEntities);
-
-    // update the description on all the annotation tabs
-    annotationEnts.forEach(function(ent) {
-      var shared = Object.keys(annotations[ent.actualName]);
-      ent.description += " These fields are shared by " + shared.join(" and ") + ".";
-
-    })
-
-    $scope.testPattern = function(attr) {
-      if (attr.rawtype == 'path')
-        return /^(\/)?([^/\0]+(\/)?)+$/;
-      //return /^(.*\/)([^/]*)$/;
-      return /(.*?)/;
-    }
-
-    $scope.attributeDescription = '';
-    $scope.attributeType = '';
-    $scope.attributeRequired = '';
-    $scope.attributeUnique = '';
-    $scope.active = 'router'
-    $scope.fieldsetDivs = "/fieldsetDivs.html"
-    $scope.setActive = function(tabName) {
-      $scope.active = tabName
-    }
-    $scope.isActive = function(tabName) {
-      return $scope.active === tabName
-    }
-    $scope.showDescription = function(attr, e) {
-        $scope.attributeDescription = attr.description;
-        var offset = jQuery(e.currentTarget).offset()
-        jQuery('.attr-description').offset({
-          top: offset.top
-        })
-
-        $scope.attributeType = "Type: " + JSON.stringify(attr.rawtype);
-        $scope.attributeRequired = attr.required ? 'required' : '';
-        $scope.attributeUnique = attr.unique ? 'Must be unique' : '';
-      }
-      // handle the download button click
-      // copy the dialog's values to the original node
-    $scope.download = function() {
-      dialog.close({
-        entities: $scope.entities,
-        annotations: annotations
-      });
-    }
-    $scope.cancel = function() {
-      dialog.close()
-    };
-
-    $scope.selectAnnotationTab = function(tabName) {
-      var tabs = $("#tabs").tabs();
-      tabs.tabs("select", tabName);
-    }
-
-    var initTabs = function() {
-        var div = angular.element("#tabs");
-        if (!div.width()) {
-          setTimeout(initTabs, 100);
-          return;
-        }
-        $("#tabs")
-          .tabs()
-          .addClass('ui-tabs-vertical ui-helper-clearfix');
-      }
-      // start the update loop
-    initTabs();
-
-  });
-
-  QDR.module.controller("QDR.DownloadDialogController", function($scope, QDRService, $templateCache, $window, dialog, results) {
-    var result = results.entities;
-    var annotations = results.annotations;
-    var annotationKeys = Object.keys(annotations);
-    var annotationSections = {};
-
-    // use the router's name as the file name if present
-    $scope.newRouterName = 'router';
-    result.forEach(function(e) {
-      if (e.actualName == 'router') {
-        e.attributes.forEach(function(a) {
-          if (a.name == 'name') {
-            $scope.newRouterName = a.value;
-          }
-        })
-      }
-    })
-    $scope.newRouterName = $scope.newRouterName + ".conf";
-
-    var template = $templateCache.get('config-file-header.html');
-    $scope.verbose = true;
-    $scope.$watch('verbose', function(newVal) {
-      if (newVal !== undefined) {
-        // recreate output using current verbose setting
-        getOutput();
-      }
-    })
-
-    var getOutput = function() {
-      $scope.output = template + '\n';
-      $scope.parts = [];
-      var commentChar = '#'
-      result.forEach(function(entity) {
-          // don't output a section for annotations, they get flattened into the entities
-          var section = "";
-          if (entity.icon) {
-            section += "##\n## Add to " + entity.link.__data__.source.name + "'s configuration file\n##\n";
-          }
-          section += "##\n## " + QDRService.humanify(entity.actualName) + " - " + entity.description + "\n##\n";
-          section += entity.actualName + " {\n";
-          entity.attributes.forEach(function(attribute) {
-            if (attribute.input == 'select')
-              attribute.value = attribute.selected;
-
-            // treat values with all spaces and empty strings as undefined
-            attribute.value = String(attribute.value).trim();
-            if (attribute.value === 'undefined' || attribute.value === '')
-              attribute.value = undefined;
-
-            if ($scope.verbose) {
-              commentChar = attribute.required || attribute.value != attribute['default'] ? ' ' : '#';
-              if (!attribute.value) {
-                commentChar = '#';
-                attribute.value = '';
-              }
-              section += commentChar + "    " + attribute.name + ":" + Array(Math.max(20 - attribute.name.length, 1)).join(" ") + attribute.value + Array(Math.max(20 - ((attribute.value) + "").length, 1)).join(" ") + '# ' + attribute.description + "\n";
-            } else {
-              if (attribute.value) {
-                if (attribute.value != attribute['default'] || attribute.required)
-                  section += "    " + attribute.name + ":" + Array(20 - attribute.name.length).join(" ") + attribute.value + "\n";
-
-              }
-            }
-          })
-          section += "}\n\n";
-          // if entity.icon is true, this is a connector intended for another router
-          if (entity.icon)
-            $scope.parts.push({
-              output: section,
-              link: entity.link,
-              name: entity.link.__data__.source.name,
-              references: entity.references
-            });
-          else
-            $scope.output += section;
-
-          // if this section is actually an annotation
-          if (annotationKeys.indexOf(entity.actualName) > -1) {
-            annotationSections[entity.actualName] = section;
-          }
-        })
-        // go back and add annotation sections to the parts
-      $scope.parts.forEach(function(part) {
-        for (var section in annotationSections) {
-          if (part.references.indexOf(section) > -1) {
-            part.output += annotationSections[section];
-          }
-        }
-      })
-      QDR.log.debug($scope.output);
-    }
-
-    // handle the download button click
-    $scope.download = function() {
-      var output = $scope.output + "\n\n"
-      var blob = new Blob([output], {
-        type: 'text/plain;charset=utf-16'
-      });
-      saveAs(blob, $scope.newRouterName);
-    }
-
-    $scope.downloadPart = function(part) {
-      var linkName = part.link.__data__.source.name + 'additional.conf';
-      var blob = new Blob([part.output], {
-        type: 'text/plain;charset=utf-16'
-      });
-      saveAs(blob, linkName);
-    }
-
-    $scope.done = function() {
-      dialog.close();
-    }
-  });
-
-  return QDR;
-}(QDR || {}));

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cc3f124d/console/hawtio/src/main/webapp/plugin/js/qdrTopology.js
----------------------------------------------------------------------
diff --git a/console/hawtio/src/main/webapp/plugin/js/qdrTopology.js b/console/hawtio/src/main/webapp/plugin/js/qdrTopology.js
index 762ef04..7be994d 100644
--- a/console/hawtio/src/main/webapp/plugin/js/qdrTopology.js
+++ b/console/hawtio/src/main/webapp/plugin/js/qdrTopology.js
@@ -56,9 +56,6 @@ QDR.log.debug("attr.description " + attr.description)
       $scope.attributes = attributes;
       $scope.form = args.entity;
     })
-    $scope.$on('showAddForm', function(event) {
-      $scope.form = 'add';
-    })
   })
 
   /**
@@ -301,20 +298,6 @@ QDR.log.debug("attr.description " + attr.description)
       urlPrefix = urlPrefix.split("#")[0]
       QDR.log.debug("started QDR.TopologyController with urlPrefix: " + urlPrefix);
 
-      $scope.addingNode = {
-        step: 0,
-        hasLink: false,
-        trigger: ''
-      };
-
-      $scope.cancel = function() {
-        $scope.addingNode.step = 0;
-      }
-      $scope.editNewRouter = function() {
-        $scope.addingNode.trigger = 'editNode';
-      }
-
-      var NewRouterName = "__NEW__";
       // mouse event vars
       var selected_node = null,
         selected_link = null,
@@ -325,151 +308,11 @@ QDR.log.debug("attr.description " + attr.description)
         initial_mouse_down_position = null;
 
       $scope.schema = "Not connected";
-
-      $scope.modes = [{
-          title: 'Topology view',
-          name: 'Diagram',
-          right: false
-        },
-        /* {title: 'Add a new router node', name: 'Add Router', right: true} */
-      ];
-      $scope.mode = "Diagram";
       $scope.contextNode = null; // node that is associated with the current context menu
-
-      $scope.isModeActive = function(name) {
-        if ((name == 'Add Router' || name == 'Diagram') && $scope.addingNode.step > 0)
-          return true;
-        return ($scope.mode == name);
-      }
-      $scope.selectMode = function(name) {
-        if (name == "Add Router") {
-          name = 'Diagram';
-          if ($scope.addingNode.step > 0) {
-            $scope.addingNode.step = 0;
-          } else {
-            // start adding node mode
-            $scope.addingNode.step = 1;
-          }
-        } else {
-          $scope.addingNode.step = 0;
-        }
-
-        $scope.mode = name;
-      }
-      $scope.$watch(function() { return $scope.addingNode.step }, function(newValue, oldValue) {
-        if (newValue == 0 && oldValue != 0) {
-          // we are cancelling the add
-
-          // find the New node
-          nodes.every(function(n, i) {
-            // for the placeholder node, the key will be __internal__
-            if (QDRService.nameFromId(n.key) == '__internal__') {
-              var newLinks = links.filter(function(e, i) {
-                  return e.source.id == n.id || e.target.id == n.id;
-                })
-                // newLinks is an array of links to remove
-              newLinks.map(function(e) {
-                  links.splice(links.indexOf(e), 1);
-                })
-                // i is the index of the node to remove
-              nodes.splice(i, 1);
-              force.nodes(nodes).links(links).start();
-              restart(false);
-              return false; // stop looping
-            }
-            return true;
-          })
-          updateForm(Object.keys(QDRService.topology.nodeInfo())[0], 'router', 0);
-
-        } else if (newValue > 0) {
-          // we are starting the add mode
-          $scope.$broadcast('showAddForm')
-
-          resetMouseVars();
-          selected_node = null;
-          selected_link = null;
-          // add a new node
-          var id = "amqp:/_topo/0/__internal__/$management";
-          var x = radiusNormal * 4;
-          var y = x;;
-          if (newValue > 1) { // add at current mouse position
-            var offset = jQuery('#topology').offset();
-            x = mouseX - offset.left + $(document).scrollLeft();
-            y = mouseY - offset.top + $(document).scrollTop();;
-          }
-          QDRService.ensureAllEntities({entity: ".router"}, function () {
-            NewRouterName = genNewName();
-            nodes.push(aNode(id, NewRouterName, "inter-router", '', nodes.length, x, y, undefined, undefined, true));
-            force.nodes(nodes).links(links).start();
-            restart(false);
-          })
-        }
-      })
       $scope.isRight = function(mode) {
         return mode.right;
       }
 
-      // for ng-grid that shows details for multiple consoles/clients
-      // generate unique name for router and containerName
-      var genNewName = function() {
-        var nodeInfo = QDRService.topology.nodeInfo();
-        var nameIndex = 1;
-        var newName = "R." + nameIndex;
-
-        var names = [];
-        for (key in nodeInfo) {
-          var node = nodeInfo[key];
-          var router = node['.router'];
-          var attrNames = router.attributeNames;
-          var name = QDRService.valFor(attrNames, router.results[0], 'routerId')
-          if (!name)
-            name = QDRService.valFor(attrNames, router.results[0], 'name')
-          names.push(name);
-        }
-
-        while (names.indexOf(newName) >= 0) {
-          newName = "R." + nameIndex++;
-        }
-        return newName;
-      }
-
-      $scope.$watch(function() {
-        return $scope.addingNode.trigger
-      }, function(newValue, oldValue) {
-        if (newValue == 'editNode') {
-          $scope.addingNode.trigger = "";
-          editNode();
-        }
-      })
-
-      function editNode() {
-        doAddDialog(NewRouterName);
-      };
-      $scope.reverseLink = function() {
-        if (!mousedown_link)
-          return;
-        var d = mousedown_link;
-        var tmp = d.left;
-        d.left = d.right;;
-        d.right = tmp;
-        restart(false);
-        tick();
-      }
-      $scope.removeLink = function() {
-        if (!mousedown_link)
-          return;
-        var d = mousedown_link;
-        links.every(function(l, i) {
-          if (l.source.id == d.source.id && l.target.id == d.target.id) {
-            links.splice(i, 1);
-            force.links(links).start();
-            return false; // exit the 'every' loop
-          }
-          return true;
-        });
-        restart(false);
-        tick();
-      }
       var setNodesFixed = function (name, b) {
         nodes.some(function (n) {
           if (n.name === name) {
@@ -613,7 +456,7 @@ QDR.log.debug("attr.description " + attr.description)
           id: nodeIndex,
           resultIndex: resultIndex,
           fixed: !!+fixed,
-          cls: name == NewRouterName ? 'temp' : '',
+          cls: '',
           container: connectionContainer
         };
       };
@@ -697,7 +540,6 @@ QDR.log.debug("attr.description " + attr.description)
             yInit *= -1
           }
           nodes.push(aNode(id, name, "inter-router", nodeInfo, nodes.length, position.x, position.y, name, undefined, position.fixed));
-          //QDR.log.debug("adding node " + nodes.length-1);
         }
       }
 
@@ -847,20 +689,6 @@ QDR.log.debug("attr.description " + attr.description)
           .attr("id", "SVG_ID")
           .attr('width', width)
           .attr('height', height)
-          .on("contextmenu", function(d) {
-            if (d3.event.defaultPrevented)
-              return;
-            d3.event.preventDefault();
-
-            if ($scope.addingNode.step != 0)
-              return;
-            if (d3.select('#svg_context_menu').style('display') !== 'block')
-              $(document).click();
-            d3.select('#svg_context_menu')
-              .style('left', (mouseX -1 + $(document).scrollLeft()) + "px")
-              .style('top', (mouseY -1 + $(document).scrollTop()) + "px")
-              .style('display', 'block');
-          })
           .on('click', function(d) {
             removeCrosssection()
           });
@@ -1294,9 +1122,6 @@ QDR.log.debug("attr.description " + attr.description)
           .classed('highlighted', function(d) {
             return d.highlighted;
           })
-          .classed('temp', function(d) {
-            return d.cls == 'temp';
-          })
           .attr('marker-start', function(d) {
             var sel = d === selected_link ? '-selected' : (d.cls === 'small' ? '-small' : '');
             if (d.highlighted)
@@ -1322,19 +1147,10 @@ QDR.log.debug("attr.description " + attr.description)
             var sel = d === selected_link ? '-selected' : (d.cls === 'small' ? '-small' : '');
             return d.right ? 'url(' + urlPrefix + '#end-arrow' + sel + ')' : '';
           })
-          .classed('temp', function(d) {
-            return d.cls == 'temp';
-          })
           .classed('small', function(d) {
             return d.cls == 'small';
           })
           .on('mouseover', function(d) { // mouse over a path
-            if ($scope.addingNode.step > 0) {
-              if (d.cls == 'temp') {
-                d3.select(this).classed('over', true);
-              }
-              return;
-            }
             //QDR.log.debug("showing connections form");
             var resultIndex = 0; // the connection to use
             var left = d.left ? d.target : d.source;
@@ -1369,28 +1185,10 @@ QDR.log.debug("attr.description " + attr.description)
             restart();
           })
           .on('mouseout', function(d) { // mouse out of a path
-            if ($scope.addingNode.step > 0) {
-              if (d.cls == 'temp') {
-                d3.select(this).classed('over', false);
-              }
-              return;
-            }
             //QDR.log.debug("showing connections form");
             selected_link = null;
             restart();
           })
-          .on("contextmenu", function(d) {  // right click a path
-            $(document).click();
-            d3.event.preventDefault();
-            if (d.cls !== "temp")
-              return;
-
-            mousedown_link = d;
-            d3.select('#link_context_menu')
-              .style('left', (mouseX -1 + $(document).scrollLeft()) + "px")
-              .style('top', (mouseY -1 + $(document).scrollTop()) + "px")
-              .style('display', 'block');
-          })
           // left click a path
           .on("click", function (d) {
             var clickPos = d3.mouse(this);
@@ -1539,9 +1337,6 @@ QDR.log.debug("attr.description " + attr.description)
             .classed('fixed', function(d) {
               return d.fixed & 1
             })
-            .classed('temp', function(d) {
-              return QDRService.nameFromId(d.key) == '__internal__';
-            })
             .classed('normal', function(d) {
               return d.nodeType == 'normal' || QDRService.isConsole(d)
             })
@@ -1578,10 +1373,6 @@ QDR.log.debug("attr.description " + attr.description)
         }
         appendCircle(g)
           .on('mouseover', function(d) {  // mouseover a circle
-            if ($scope.addingNode.step > 0) {
-              d3.select(this).attr('transform', 'scale(1.1)');
-              return;
-            }
             if (!selected_node && !mousedown_node) {
               if (d.nodeType === 'inter-router') {
                 //QDR.log.debug("showing general form");
@@ -1650,23 +1441,6 @@ QDR.log.debug("attr.description " + attr.description)
             }
 
             // we didn't drag, we just clicked on the node
-            if ($scope.addingNode.step > 0) {
-              if (d.nodeType !== 'inter-router')
-                return;
-              if (QDRService.nameFromId(d.key) == '__internal__')
-                return;
-
-              // add a link from the clicked node to the new node
-              getLink(d.id, nodes.length - 1, "in", "temp", "__internal__");
-              $scope.addingNode.hasLink = true;
-              if (!$scope.$$phase) $scope.$apply()
-                // add new elements to the svg
-              force.links(links).start();
-              restart();
-              return;
-
-            }
-
             // if this node was selected, unselect it
             if (mousedown_node === selected_node) {
               selected_node = null;
@@ -2079,8 +1853,6 @@ QDR.log.debug("attr.description " + attr.description)
       function hasChanged() {
         // Don't update the underlying topology diagram if we are adding a new node.
         // Once adding is completed, the topology will update automatically if it has changed
-        if ($scope.addingNode.step > 0)
-          return -2;
         var nodeInfo = QDRService.topology.nodeInfo();
         if (Object.keys(nodeInfo).length != Object.keys(savedKeys).length)
           return Object.keys(nodeInfo).length > Object.keys(savedKeys).length ? 1 : -1;
@@ -2112,7 +1884,6 @@ QDR.log.debug("attr.description " + attr.description)
       $rootScope.$on('$locationChangeStart', function(event, newUrl, oldUrl) {
         //QDR.log.debug("locationChangeStart");
         savePositions()
-        $scope.addingNode.step = 0;
       });
       // When the DOM element is removed from the page,
       // AngularJS will trigger the $destroy event on
@@ -2182,48 +1953,6 @@ QDR.log.debug("attr.description " + attr.description)
       setupInitialUpdate();
       QDRService.startUpdating();
 
-      function doAddDialog(NewRouterName) {
-        QDRService.ensureAllEntities({entity: ".listener"}, function () {
-          var d = $dialog.dialog({
-            dialogClass: "modal dlg-large",
-            backdrop: true,
-            keyboard: true,
-            backdropClick: true,
-            controller: 'QDR.NodeDialogController',
-            templateUrl: 'node-config-template.html',
-            resolve: {
-              newname: function() {
-                return NewRouterName;
-              }
-            }
-          });
-          $timeout(function () {
-            d.open().then(function(result) {
-              if (result)
-                doDownloadDialog(result);
-            });
-          })
-        })
-      };
-
-      function doDownloadDialog(result) {
-        d = $dialog.dialog({
-          backdrop: true,
-          keyboard: true,
-          backdropClick: true,
-          controller: 'QDR.DownloadDialogController',
-          templateUrl: 'download-dialog-template.html',
-          resolve: {
-            results: function() {
-              return result;
-            }
-          }
-        });
-        d.open().then(function(result) {
-          //QDR.log.debug("download dialog done")
-        })
-        if (!$scope.$$phase) $scope.$apply()
-      };
     }
   ]);
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cc3f124d/console/hawtio/src/main/webapp/plugin/lib/FileSaver.min.js
----------------------------------------------------------------------
diff --git a/console/hawtio/src/main/webapp/plugin/lib/FileSaver.min.js b/console/hawtio/src/main/webapp/plugin/lib/FileSaver.min.js
deleted file mode 100644
index b1cb31d..0000000
--- a/console/hawtio/src/main/webapp/plugin/lib/FileSaver.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
-var saveAs=saveAs||"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var k=a.document,n=k.createElementNS("http://www.w3.org/1999/xhtml","a"),w="download"in n,x=function(c){var e=k.createEvent("MouseEvents");e.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null);c.dispatchEvent(e)},q=a.webkitRequestFileSystem,u=a.requestFileSystem||q||a.mozRequestFileSystem,
-y=function(c){(a.setImmediate||a.setTimeout)(function(){throw c;},0)},r=0,s=function(c){var e=function(){"string"===typeof c?(a.URL||a.webkitURL||a).revokeObjectURL(c):c.remove()};a.chrome?e():setTimeout(e,500)},t=function(c,a,d){a=[].concat(a);for(var b=a.length;b--;){var l=c["on"+a[b]];if("function"===typeof l)try{l.call(c,d||c)}catch(f){y(f)}}},m=function(c,e){var d=this,b=c.type,l=!1,f,p,k=function(){t(d,["writestart","progress","write","writeend"])},g=function(){if(l||!f)f=(a.URL||a.webkitURL||
-a).createObjectURL(c);p?p.location.href=f:void 0==a.open(f,"_blank")&&"undefined"!==typeof safari&&(a.location.href=f);d.readyState=d.DONE;k();s(f)},h=function(a){return function(){if(d.readyState!==d.DONE)return a.apply(this,arguments)}},m={create:!0,exclusive:!1},v;d.readyState=d.INIT;e||(e="download");if(w)f=(a.URL||a.webkitURL||a).createObjectURL(c),n.href=f,n.download=e,x(n),d.readyState=d.DONE,k(),s(f);else{a.chrome&&b&&"application/octet-stream"!==b&&(v=c.slice||c.webkitSlice,c=v.call(c,0,
-c.size,"application/octet-stream"),l=!0);q&&"download"!==e&&(e+=".download");if("application/octet-stream"===b||q)p=a;u?(r+=c.size,u(a.TEMPORARY,r,h(function(a){a.root.getDirectory("saved",m,h(function(a){var b=function(){a.getFile(e,m,h(function(a){a.createWriter(h(function(b){b.onwriteend=function(b){p.location.href=a.toURL();d.readyState=d.DONE;t(d,"writeend",b);s(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&g()};["writestart","progress","write","abort"].forEach(function(a){b["on"+
-a]=d["on"+a]});b.write(c);d.abort=function(){b.abort();d.readyState=d.DONE};d.readyState=d.WRITING}),g)}),g)};a.getFile(e,{create:!1},h(function(a){a.remove();b()}),h(function(a){a.code===a.NOT_FOUND_ERR?b():g()}))}),g)}),g)):g()}},b=m.prototype;b.abort=function(){this.readyState=this.DONE;t(this,"abort")};b.readyState=b.INIT=0;b.WRITING=1;b.DONE=2;b.error=b.onwritestart=b.onprogress=b.onwrite=b.onabort=b.onerror=b.onwriteend=null;return function(a,b){return new m(a,b)}}}("undefined"!==typeof self&&
-self||"undefined"!==typeof window&&window||this.content);"undefined"!==typeof module&&null!==module?module.exports=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
\ No newline at end of file


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