Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TP: converts DS tables to more performant and powerful ag-grid #5408

Merged
merged 24 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
275af12
fixes invalid syntax
mitchell852 Jan 6, 2021
901abf0
converts ds table to ag-grid
mitchell852 Jan 6, 2021
316e81b
fixes broken context menu item
mitchell852 Jan 7, 2021
956dda3
adds ag-grid to cdn ds table
mitchell852 Jan 7, 2021
fc60f10
adds ag-grid to profile ds table
mitchell852 Jan 7, 2021
ccc177d
adds More menu to cdn and profile ds table
mitchell852 Jan 7, 2021
6122944
adds ag-grid to service category ds table
mitchell852 Jan 7, 2021
25f9d4a
add ag-grid to tenant ds table
mitchell852 Jan 7, 2021
cedb426
adds ag-grid to topology ds table
mitchell852 Jan 7, 2021
89f36b1
adds ag-grid to type ds table
mitchell852 Jan 7, 2021
674b932
fixes navigation path
mitchell852 Jan 7, 2021
22eb952
adds ag-grid to server ds table
mitchell852 Jan 7, 2021
8dcbe2b
cosmetic changes
mitchell852 Jan 8, 2021
1e0beb6
adds changelog.md entry
mitchell852 Jan 8, 2021
711a5c6
updates documentation
mitchell852 Jan 8, 2021
dccca30
refactors ds tests for new ag-grid
mitchell852 Jan 13, 2021
a37b8ae
adds missing name attributes needed for tests
mitchell852 Jan 13, 2021
3fd9f49
fixes ds ui tests
mitchell852 Jan 14, 2021
7ee4e9c
adds sleep
mitchell852 Jan 14, 2021
ded7983
fixes ui test
mitchell852 Jan 14, 2021
1e33b04
adds min=1 to pagesize for all ag-grid tables
mitchell852 Jan 15, 2021
bd64dab
adds agNumberColumnFilter to number columns
mitchell852 Jan 15, 2021
5a68acf
updates menuitem to not be anchor and use button instead
mitchell852 Jan 15, 2021
4a799c9
fixes broken ui tests
mitchell852 Jan 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Added
- Traffic Portal: [#5394](https://github.com/apache/trafficcontrol/issues/5394) - Converts the tenant table to a tenant tree for usability
- Traffic Portal: [#5360](https://github.com/apache/trafficcontrol/issues/5360) - Adds the ability to clone a topology
- Traffic Portal: upgraded delivery service UI tables to use more powerful/performant ag-grid component
- Traffic Ops: added a feature so that the user can specify `maxRequestHeaderBytes` on a per delivery service basis
- Traffic Router: log warnings when requests to Traffic Monitor return a 503 status code
- [#5344](https://github.com/apache/trafficcontrol/issues/5344) - Add a page that addresses migrating from Traffic Ops API v1 for each endpoint
Expand Down
Binary file modified docs/source/admin/traffic_portal/images/tp_menu_services.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/admin/traffic_portal/images/tp_table_ds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/admin/traffic_portal/usingtrafficportal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ A table showing the results of the periodic :ref:`to-check-ext` that are run. Th

Services
========
:guilabel:`Services` groups the functionality to modify :term:`Delivery Services` - for those users with the necessary permissions - or make Delivery Service Requests for such changes - for users without necessary permissions.
:guilabel:`Services` groups the functionality to modify :term:`Delivery Services` - for those users with the necessary permissions - or make Delivery Service Requests for such changes - for users without necessary permissions. Delivery Services can also be grouped by :term:`Service Category`.


.. figure:: ./images/tp_menu_services.png
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<li role="menuitem"><a ng-click="viewOrigins()">Manage Origins</a></li>
<li role="menuitem"><a ng-click="viewRegexes()">Manage Regexes</a></li>
<li role="menuitem"><a ng-click="viewCapabilities()">Manage Required Server Capabilities</a></li>
<li role="menuitem"><a ng-click="viewServers()">Manage Servers</a></li>
<li name="manageServersMenuItem" role="menuitem"><button class="menu-item-button" type="button" ng-click="viewServers()">Manage Servers</button></li>
<li role="menuitem"><a ng-click="viewStaticDnsEntries()">Manage Static DNS Entries</a></li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<li role="menuitem"><a ng-click="viewOrigins()">Manage Origins</a></li>
<li role="menuitem"><a ng-click="viewRegexes()">Manage Regexes</a></li>
<li role="menuitem"><a ng-click="viewCapabilities()">Manage Required Server Capabilities</a></li>
<li role="menuitem"><a ng-click="viewServers()">Manage Servers</a></li>
<li name="manageServersMenuItem" role="menuitem"><button class="menu-item-button" type="button" ng-click="viewServers()">Manage Servers</button></li>
<li role="menuitem"><a ng-click="viewStaticDnsEntries()">Manage Static DNS Entries</a></li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<hr class="divider"/>
<li role="menuitem"><a ng-click="viewCharts()">View Charts</a></li>
<hr class="divider"/>
<li role="menuitem"><a ng-click="viewServers()">Manage Servers</a></li>
<li name="manageServersMenuItem" role="menuitem"><button class="menu-item-button" type="button" ng-click="viewServers()">Manage Servers</button></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<li class="active">{{tenantName}}</li>
</ol>
<div class="pull-right" role="group" ng-show="!settings.isNew">
<button class="btn btn-default" title="View Users" ng-click="viewUsers()">View Users</button>
<button class="btn btn-primary" title="View Users" ng-click="viewUsers()">View Users</button>
<div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
<button name="moreBtn" type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
<button name="moreBtn" type="button" class="btn btn-primary dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
View Delivery Services&nbsp;
<span class="caret"></span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<span class="input-group-addon">
<label for="pageSize">Page size</label>
</span>
<input id="pageSize" name="pageSize" type="number" class="form-control" placeholder="100" ng-model="pageSize" ng-change="onPageSizeChanged()" aria-label="Page Size"/>
<input id="pageSize" name="pageSize" type="number" min="1" class="form-control" placeholder="100" ng-model="pageSize" ng-change="onPageSizeChanged()" aria-label="Page Size"/>
</div>
<div id="toggleColumns" class="btn-group" role="group" title="Select Table Columns" uib-dropdown is-open="columnSettings.isopen">
<button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,13 @@
* under the License.
*/

var TableCDNDeliveryServicesController = function(cdn, deliveryServices, $controller, $scope) {
var TableCDNDeliveryServicesController = function(cdn, deliveryServices, filter, $controller, $scope) {

// extends the TableDeliveryServicesController to inherit common methods
angular.extend(this, $controller('TableDeliveryServicesController', { deliveryServices: deliveryServices, $scope: $scope }));

let cdnDeliveryServicesTable;
angular.extend(this, $controller('TableDeliveryServicesController', { tableName: 'cdnDS', deliveryServices: deliveryServices, filter: filter, $scope: $scope }));

$scope.cdn = cdn;

$scope.toggleVisibility = function(colName) {
const col = cdnDeliveryServicesTable.column(colName + ':name');
col.visible(!col.visible());
cdnDeliveryServicesTable.rows().invalidate().draw();
};

angular.element(document).ready(function () {
cdnDeliveryServicesTable = $('#cdnDeliveryServicesTable').DataTable({
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"iDisplayLength": 25,
"aaSorting": [],
"columns": $scope.columns,
"initComplete": function(settings, json) {
try {
// need to create the show/hide column checkboxes and bind to the current visibility
$scope.columns = JSON.parse(localStorage.getItem('DataTables_cdnDeliveryServicesTable_/')).columns;
} catch (e) {
console.error("Failure to retrieve required column info from localStorage (key=DataTables_cdnDeliveryServicesTable_/):", e);
}
}
});
});

};

TableCDNDeliveryServicesController.$inject = ['cdn', 'deliveryServices', '$controller', '$scope'];
TableCDNDeliveryServicesController.$inject = ['cdn', 'deliveryServices', 'filter', '$controller', '$scope'];
module.exports = TableCDNDeliveryServicesController;
Loading