From 1583adbc075eb0c578906af69e23663e99070ebf Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Mon, 5 May 2014 18:52:28 -0400
Subject: [PATCH] Renamed TPS connection to TPS connector (part 2).

The TPS connection UI components have been renamed to TPS connector.

Ticket #977
---
 .../webapps/tps/js/{connection.js => connector.js} | 24 +++++++++----------
 .../tps/ui/{connection.html => connector.html}     | 14 +++++------
 .../tps/ui/{connections.html => connectors.html}   | 10 ++++----
 base/tps-tomcat/shared/webapps/tps/ui/index.html   | 28 +++++++++++-----------
 4 files changed, 38 insertions(+), 38 deletions(-)
 rename base/tps-tomcat/shared/webapps/tps/js/{connection.js => connector.js} (84%)
 rename base/tps-tomcat/shared/webapps/tps/ui/{connection.html => connector.html} (88%)
 rename base/tps-tomcat/shared/webapps/tps/ui/{connections.html => connectors.html} (86%)

diff --git a/base/tps-tomcat/shared/webapps/tps/js/connection.js b/base/tps-tomcat/shared/webapps/tps/js/connector.js
similarity index 84%
rename from base/tps-tomcat/shared/webapps/tps/js/connection.js
rename to base/tps-tomcat/shared/webapps/tps/js/connector.js
index 020b9e57b4fe72778cd093b87114aa01a9d60316..bca87818a47ee2de3d87ff0a4ff584e55945c1a3 100644
--- a/base/tps-tomcat/shared/webapps/tps/js/connection.js
+++ b/base/tps-tomcat/shared/webapps/tps/js/connector.js
@@ -19,19 +19,19 @@
  * @author Endi S. Dewata
  */
 
-var ConnectionModel = Model.extend({
+var ConnectorModel = Model.extend({
     urlRoot: "/tps/rest/connections",
     parseResponse: function(response) {
         return {
             id: response.id,
-            connectionID: response.id,
+            connectorID: response.id,
             status: response.Status,
             properties: response.Properties.Property
         };
     },
     createRequest: function(attributes) {
         return {
-            id: attributes.connectionID,
+            id: attributes.connectorID,
             Status: attributes.status,
             Properties: {
                 Property: attributes.properties
@@ -66,7 +66,7 @@ var ConnectionModel = Model.extend({
     }
 });
 
-var ConnectionCollection = Collection.extend({
+var ConnectorCollection = Collection.extend({
     urlRoot: "/tps/rest/connections",
     getEntries: function(response) {
         return response.entries;
@@ -75,32 +75,32 @@ var ConnectionCollection = Collection.extend({
         return response.Link;
     },
     parseEntry: function(entry) {
-        return new ConnectionModel({
+        return new ConnectorModel({
             id: entry.id,
             status: entry.Status
         });
     }
 });
 
-var ConnectionsTable = ModelTable.extend({
+var ConnectorsTable = ModelTable.extend({
     initialize: function(options) {
         var self = this;
-        ConnectionsTable.__super__.initialize.call(self, options);
+        ConnectorsTable.__super__.initialize.call(self, options);
     },
     add: function() {
         var self = this;
 
-        window.location.hash = "#new-connection";
+        window.location.hash = "#new-connector";
     }
 });
 
-var ConnectionsPage = Page.extend({
+var ConnectorsPage = Page.extend({
     load: function() {
         var self = this;
 
-        var table = new ConnectionsTable({
-            el: $("table[name='connections']"),
-            collection: new ConnectionCollection(),
+        var table = new ConnectorsTable({
+            el: $("table[name='connectors']"),
+            collection: new ConnectorCollection(),
             parent: self
         });
 
diff --git a/base/tps-tomcat/shared/webapps/tps/ui/connection.html b/base/tps-tomcat/shared/webapps/tps/ui/connector.html
similarity index 88%
rename from base/tps-tomcat/shared/webapps/tps/ui/connection.html
rename to base/tps-tomcat/shared/webapps/tps/ui/connector.html
index 68a759e9546eb8479495bbd886c2d59cbbd1a247..1eba29f6cffae56c71a0456049fa928c58933f9d 100644
--- a/base/tps-tomcat/shared/webapps/tps/ui/connection.html
+++ b/base/tps-tomcat/shared/webapps/tps/ui/connector.html
@@ -18,7 +18,7 @@
 <div class="pki-header">
 <ol class="breadcrumb">
     <li><a href="#">Home</a></li>
-    <li><a href="#connections">Subsystem Connections</a></li>
+    <li><a href="#connectors">Subsystem Connections</a></li>
     <li class="active"><strong><span name="title">Subsystem Connection ${id}</span></strong></li>
 </ol>
 
@@ -40,10 +40,10 @@
 
 </div>
 
-<div name="connection" class="pki-fields">
+<div name="connector" class="pki-fields">
 <fieldset>
-    <label>Connection ID</label>
-    <input name="connectionID" readonly="readonly">
+    <label>Connector ID</label>
+    <input name="connectorID" readonly="readonly">
     <br>
     <label>Status</label>
     <input name="status" readonly="readonly">
@@ -67,15 +67,15 @@
          </th>
     </tr>
     <tr>
-        <th class="pki-select-column"><input id="connection_selectall" type="checkbox"><label for="connection_selectall">&nbsp;</label></th>
+        <th class="pki-select-column"><input id="connector_selectall" type="checkbox"><label for="connector_selectall">&nbsp;</label></th>
         <th class="pki-property-name-column">Name</th>
         <th>Value</th>
     </tr>
 </thead>
 <tbody>
     <tr>
-        <td class="pki-select-column"><input id="connection_select" type="checkbox"><label for="connection_select">&nbsp;</label></td>
-        <td name="id" class="pki-property-name-column"><a href="/tps/ui/connections/${parent.id}/properties/${id}">${id}</a></td>
+        <td class="pki-select-column"><input id="connector_select" type="checkbox"><label for="connector_select">&nbsp;</label></td>
+        <td name="id" class="pki-property-name-column"><a href="/tps/ui/connectors/${parent.id}/properties/${id}">${id}</a></td>
         <td name="value">${value}</td>
     </tr>
 </tbody>
diff --git a/base/tps-tomcat/shared/webapps/tps/ui/connections.html b/base/tps-tomcat/shared/webapps/tps/ui/connectors.html
similarity index 86%
rename from base/tps-tomcat/shared/webapps/tps/ui/connections.html
rename to base/tps-tomcat/shared/webapps/tps/ui/connectors.html
index d700e1f3cedb2727d940580e16b3ba34a2b8f70b..4d4d597725db86a601f67680dbc769e3e6c971e2 100644
--- a/base/tps-tomcat/shared/webapps/tps/ui/connections.html
+++ b/base/tps-tomcat/shared/webapps/tps/ui/connectors.html
@@ -24,7 +24,7 @@
 <span class="pki-title">Subsystem Connections</span>
 </div>
 
-<table name="connections">
+<table name="connectors">
 <thead>
     <tr>
          <th class="pki-table-actions" colspan="3">
@@ -38,15 +38,15 @@
          </th>
     </tr>
     <tr>
-        <th class="pki-select-column"><input id="connection_selectall" type="checkbox"><label for="connection_selectall">&nbsp;</label></th>
-        <th>Connection ID</th>
+        <th class="pki-select-column"><input id="connector_selectall" type="checkbox"><label for="connector_selectall">&nbsp;</label></th>
+        <th>Connector ID</th>
         <th>Status</th>
     </tr>
 </thead>
 <tbody>
     <tr>
-        <td class="pki-select-column"><input id="connection_select" type="checkbox"><label for="connection_select">&nbsp;</label></td>
-        <td name="id"><a href="#connections/${id}">${id}</a></td>
+        <td class="pki-select-column"><input id="connector_select" type="checkbox"><label for="connector_select">&nbsp;</label></td>
+        <td name="id"><a href="#connectors/${id}">${id}</a></td>
         <td name="status">${status}</td>
     </tr>
 </tbody>
diff --git a/base/tps-tomcat/shared/webapps/tps/ui/index.html b/base/tps-tomcat/shared/webapps/tps/ui/index.html
index 6969e786a68ff3b25078917e8c5eef122650b2a4..8a969e0eebd879933f07e99c82febef2b7b8296c 100644
--- a/base/tps-tomcat/shared/webapps/tps/ui/index.html
+++ b/base/tps-tomcat/shared/webapps/tps/ui/index.html
@@ -32,7 +32,7 @@
     <script src="/tps/js/authenticator.js"></script>
     <script src="/tps/js/cert.js"></script>
     <script src="/tps/js/config.js"></script>
-    <script src="/tps/js/connection.js"></script>
+    <script src="/tps/js/connector.js"></script>
     <script src="/tps/js/group.js"></script>
     <script src="/tps/js/profile.js"></script>
     <script src="/tps/js/profile-mapping.js"></script>
@@ -135,30 +135,30 @@ $(function() {
         }).open();
     });
 
-    router.route("connections", "connections", function() {
-        new ConnectionsPage({
+    router.route("connectors", "connectors", function() {
+        new ConnectorsPage({
             el: content,
-            url: "connections.html"
+            url: "connectors.html"
         }).open();
     });
 
-    router.route("connections/:id", "connection", function(id) {
+    router.route("connectors/:id", "connector", function(id) {
         new ConfigEntryPage({
             el: content,
-            url: "connection.html",
-            model: new ConnectionModel({ id: id })
+            url: "connector.html",
+            model: new ConnectorModel({ id: id })
         }).open();
     });
 
-    router.route("new-connection", "new-connection", function() {
+    router.route("new-connector", "new-connector", function() {
         new ConfigEntryPage({
             el: content,
-            url: "connection.html",
-            model: new ConnectionModel(),
+            url: "connector.html",
+            model: new ConnectorModel(),
             mode: "add",
-            title: "New Connection",
-            editable: ["connectionID"],
-            parentHash: "#connections"
+            title: "New Connector",
+            editable: ["connectorID"],
+            parentHash: "#connectors"
         }).open();
     });
 
@@ -381,7 +381,7 @@ $(function() {
       <ul class="dropdown-menu">
         <li><a href="#config">General Configuration</a></li>
         <li><a href="#authenticators">Authentication Sources</a></li>
-        <li><a href="#connections">Subsystem Connections</a></li>
+        <li><a href="#connectors">Subsystem Connections</a></li>
         <li><a href="#profiles">Profiles</a></li>
         <li><a href="#profile-mappings">Profile Mappings</a></li>
         <li><a href="#audit">Audit Logging</a></li>
-- 
1.8.4.2

