You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/05/06 14:18:20 UTC

[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #3540: TP: improved snapshot diff performance/experience

mitchell852 commented on a change in pull request #3540: TP: improved snapshot diff performance/experience
URL: https://github.com/apache/trafficcontrol/pull/3540#discussion_r281204949
 
 

 ##########
 File path: traffic_portal/app/src/modules/private/cdns/config/config.tpl.html
 ##########
 @@ -26,98 +26,272 @@
         </ol>
         <div class="pull-right" ng-show="!settings.isNew">
             <button type="button" class="btn btn-default" ng-click="navigateToPath('/cdns/' + cdn.id)">Cancel</button>
-            <button class="btn btn-primary" title="Snapshot {{cdn.name}} Config" ng-click="confirmSnapshot(cdn)"><i class="fa fa-camera"></i>&nbsp;&nbsp;Perform Snapshot</button>
+            <button class="btn btn-primary" title="Perform {{cdn.name}} Snapshot" ng-click="confirmSnapshot(cdn)"><i class="fa fa-camera"></i>&nbsp;&nbsp;Perform Snapshot</button>
         </div>
-
         <div class="clearfix"></div>
     </div>
     <div id="snapshotContainer" class="x_content">
         <uib-tabset active="active" justified="true">
-            <uib-tab index="0" class="tab" ng-click="diffConfig(500)">
-                <uib-tab-heading uib-popover-template="configCount.templateUrl" popover-title="{{configCount.added + configCount.removed}} Total Changes" popover-trigger="mouseenter" popover-placement="top" popover-append-to-body="true">
-                    General [ {{configCount.added}} | {{configCount.removed}} ]
+            <uib-tab index="0" class="tab">
+                <uib-tab-heading uib-popover-template="configCount.templateUrl" popover-title="{{configCount.added + configCount.removed + configCount.updated}} Total Changes" popover-trigger="mouseenter" popover-placement="top" popover-append-to-body="true">
+                    General Config<br/>[ {{configCount.added}} | {{configCount.removed}} | {{configCount.updated}} ]
+                </uib-tab-heading>
+                <div class="x_content">
+                    <br>
+                    <table id="configChangesTable" class="table responsive-utilities jambo_table changes">
+                        <thead>
+                        <tr class="headings">
+                            <th>Change Type</th>
+                            <th>Path</th>
+                            <th>Current Value</th>
+                            <th>Pending Value</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr ng-repeat="configChange in ::configChanges track by $index">
+                            <td data-search="^{{::configChange.op}}$">{{::configChange.op}}</td>
+                            <td data-search="^{{::configChange.path}}$">{{::configChange.path}}</td>
+                            <td class="value" data-search="^{{::configChange.oldValue}}$"><json-formatter open="expandLevel" json="configChange.oldValue"></json-formatter></td>
+                            <td class="value" data-search="^{{::configChange.value}}$"><json-formatter open="expandLevel" json="configChange.value"></json-formatter></td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </uib-tab>
+            <uib-tab index="1" class="tab">
+                <uib-tab-heading uib-popover-template="contentRoutersCount.templateUrl" popover-title="{{contentRoutersCount.added + contentRoutersCount.removed + contentRoutersCount.updated}} Total Changes" popover-trigger="mouseenter" popover-placement="top" popover-append-to-body="true">
+                    Traffic Routers<br/>[ {{contentRoutersCount.added}} | {{contentRoutersCount.removed}} | {{contentRoutersCount.updated}} ]
                 </uib-tab-heading>
-                <pre id="config"></pre>
+                <div class="x_content">
+                    <br>
+                    <table id="contentRoutersChangesTable" class="table responsive-utilities jambo_table changes">
+                        <thead>
+                        <tr class="headings">
+                            <th>Change Type</th>
+                            <th>Path</th>
+                            <th>Current Value</th>
+                            <th>Pending Value</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr ng-repeat="cr in ::contentRoutersChanges track by $index">
+                            <td data-search="^{{::cr.op}}$">{{::cr.op}}</td>
+                            <td data-search="^{{::cr.path}}$">{{::cr.path}}</td>
+                            <td class="value" data-search="^{{::cr.oldValue}}$"><json-formatter open="expandLevel" json="cr.oldValue"></json-formatter></td>
+                            <td class="value" data-search="^{{::cr.value}}$"><json-formatter open="expandLevel" json="cr.value"></json-formatter></td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
             </uib-tab>
-            <uib-tab index="1" class="tab" ng-click="diffContentRouters(500)">
-                <uib-tab-heading uib-popover-template="contentRoutersCount.templateUrl" popover-title="{{contentRoutersCount.added + contentRoutersCount.removed}} Total Changes" popover-trigger="mouseenter" popover-placement="top" popover-append-to-body="true">
-                    Traffic Routers [ {{contentRoutersCount.added}} | {{contentRoutersCount.removed}} ]
+            <uib-tab index="1" class="tab">
 
 Review comment:
   whoops

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services