Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- `ip_allow.config`
- `parent.config`
- `remap.config`
- Removed from Traffic Portal the ability to view cache server config files as the contents are no longer reliable through the TO API due to the introduction of atstccfg.


## [4.1.0] - 2020-04-23
### Added
Expand Down
11 changes: 0 additions & 11 deletions traffic_portal/app/src/common/api/ServerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,6 @@ var ServerService = function($http, locationUtils, messageModel, ENV) {
)
};

this.getServerConfigFile = function(url) {
return $http.get(url).then(
function(result) {
return result.data;
},
function(err) {
throw err;
}
);
};

this.getEligibleDeliveryServiceServers = function(dsId) {
return $http.get(ENV.api['root'] + 'deliveryservices/' + dsId + '/servers/eligible').then(
function (result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,56 +27,13 @@ var TableServerConfigFilesController = function(server, serverConfigFiles, $scop
$state.reload(); // reloads all the resolves for the view
};

$scope.view = function(name, url) {
var params = {
title: name
};
var modalInstance = $uibModal.open({
templateUrl: 'common/modules/dialog/text/dialog.text.tpl.html',
controller: 'DialogTextController',
windowClass: 'dialog-90',
resolve: {
params: function () {
return params;
},
text: function(serverService) {
return serverService.getServerConfigFile(url);
}
}
});
modalInstance.result.then(function() {}, function() {}); // do nothing on modal close

};

$scope.download = function(name, url, $event) {
$event.stopPropagation(); // this kills the click event so it doesn't trigger anything else

// we're going to trick the browser into opening a download dialog
// generate a temp <a> tag
var link = document.createElement("a");
link.href = url;

// keep it hidden
link.style = "visibility:hidden";
link.download = name;

// briefly append the <a> tag and remove it after auto click
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
};

$scope.navigateToPath = locationUtils.navigateToPath;

angular.element(document).ready(function () {
$('#configFilesTable').dataTable({
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"iDisplayLength": 25,
"aaSorting": [],
"columnDefs": [
{ 'orderable': false, 'targets': 3 },
{ "width": "5%", "targets": 3 }
]
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@
<th>Name</th>
<th>Location</th>
<th>Scope</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-click="view(c.fnameOnDisk, c.apiUri)" ng-repeat="c in ::configFiles">
<tr ng-repeat="c in ::configFiles">
<td data-search="^{{::c.fnameOnDisk}}$">{{::c.fnameOnDisk}}</td>
<td data-search="^{{::c.location}}$">{{::c.location}}</td>
<td data-search="^{{::c.scope}}$">{{::c.scope}}</td>
<td><a title="Download {{::c.fnameOnDisk}}" ng-click="download(c.fnameOnDisk, c.apiUri, $event)"><i class="fa fa-download" aria-hidden="true"></i></a></td>
</tr>
</tbody>
</table>
Expand Down