Skip to content

Commit

Permalink
Implement workaround on retrieval and display of numbers in applicati…
Browse files Browse the repository at this point in the history
…on details view (#5)

Refers RestComm/Restcomm-Connect#2647
  • Loading branch information
otsakir authored and ammendonca committed Nov 23, 2017
1 parent 01f4ca5 commit 0884e4d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/webapp/modules/application-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@

<div class="row app-numbers-section">
<div class="col-md-12">
<h3 class="details-section-title">Numbers <span class="hidden-xs">that are using this application<span></h3>
<p>
<span class="details-field-title">(n/a)</span>
<h3 class="details-section-title">Numbers <span class="hidden-xs">using this application<span></h3>
<p ng-show="app.numbers.length > 0">
<span ng-repeat="appNumber in app.numbers" class="details-field-title"><a class="rc-link" href="#/numbers/incoming/{{appNumber.sid}}">{{appNumber.phone_number}}</a> </span>
</p>
<p ng-hide="app.numbers.length > 0">
<span class="rc-note">None</span>
</p>

</div>
Expand Down
7 changes: 7 additions & 0 deletions src/main/webapp/resources/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,13 @@ div.input-group.f16 > .input-group-btn > .dropdown-toggle {
color: #6d6e70;
}

/* A small piece of text like a label that has symbolic value like RVD, External, None etc. */
.rc-note {
color: #6d6e70;
font-weight: 300;
font-size: 19px;
}

/* experimental link underline feature */

.rc-link:hover {
Expand Down
12 changes: 12 additions & 0 deletions src/main/webapp/resources/js/controllers/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ angular.module('rcApp.controllers').controller('ApplicationDetailsCtrl', functio
$location.path("/applications");
});
// TODO also retrieve IncomingNumbers list for specific application
// for now, we will extract the numbers from Application listing by filtering on the client side until proper
// REST method support is provided
// we populate $scope.app with 'numbers' property of filtered application element
var allApps = RCommApplications.query({accountSid: accountSid, includeNumbers: true}, function() {
if (Array.isArray(allApps) )
for (var i=0; i < allApps.length; i++) {
if (applicationSid == allApps[i].sid) {
$scope.app.numbers = allApps[i].numbers
}
}
});


$scope.confirmApplicationDelete = function(app) {
confirmApplicationDelete(app, $dialog, $scope, Notifications, RCommApplications, RvdProjects, $location)
Expand Down

0 comments on commit 0884e4d

Please sign in to comment.