Skip to content
Open
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
9 changes: 8 additions & 1 deletion app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ searchModule("BYO DID Numbers", "byo-did-numbers", ['byo', 'did numbers', 'did',
'extensions': [
'extensions',
'extension-create',
'extension-edit'
'extension-edit',
'history'
],
'recordings': [
'recordings'
Expand Down Expand Up @@ -1428,6 +1429,12 @@ var regParams = {
controller: 'ExtensionsCtrl',
params: listPageParams
})
.state('history', {
url: '/extension/{extensionId}/history?page&search',
parent: 'dashboard',
templateUrl: 'views/pages/history.html',
controller: 'HistoryCtrl',
})
.state('extension-create', {
url: '/extension/create',
parent: 'dashboard',
Expand Down
7 changes: 5 additions & 2 deletions app/scripts/controllers/Extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ angular.module('Lineblocs').controller('ExtensionsCtrl', function ($scope, Backe
$scope.$shared = $shared;
$scope.pagination = pagination;
$scope.Backend = Backend;

function DialogController($scope, $mdDialog, extension, $shared) {
$scope.$shared = $shared;
$scope.extension = extension;
$scope.close = function() {
$mdDialog.hide();
$mdDialog.hide();
}
}
$scope.settings = {
Expand All @@ -45,6 +45,9 @@ angular.module('Lineblocs').controller('ExtensionsCtrl', function ($scope, Backe
$scope.createExtension = function(extension) {
$state.go('extension-create', {});
}
$scope.historyInfo = function(extension) {
$state.go('history', {extensionId: extension.public_id});
}
$scope.connectInfo = function($event, extension) {
$mdDialog.show({
controller: DialogController,
Expand Down
67 changes: 67 additions & 0 deletions app/scripts/controllers/History.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
'use strict';

/**
* @ngdoc function
* @name Lineblocs.controller:MainCtrl
* @description
* # MainCtrl
* Controller of Lineblocs
*/
angular.module('Lineblocs').controller('HistoryCtrl', function ($scope, Backend, pagination, $location, $state, $shared, $q, $stateParams) {
$shared.updateTitle("History");
$scope.$stateParams = $stateParams;
$scope.$shared = $shared;
$scope.pagination = pagination;
$scope.Backend = Backend;
$shared.isLoading = false;
$scope.history = [
{
"from": "123-202-3030",
"to": "123-222-3030",
"call_duration": 36,
"direction": "incoming",
"status": "Answered"
},
{
"from": "122-202-3030",
"to": "123-202-3030",
"call_duration": 1806,
"direction": "outgoing",
"status": "Rejected"
},
{
"from": "121-202-3030",
"to": "123-102-3030",
"call_duration": 1254,
"direction": "incoming",
"status": "Busy"
}
];

$scope.sortColumn = function(column) {
if ($scope.activeColumn === column) {
$scope.sortReverse = !$scope.sortReverse;
} else {
$scope.activeColumn = column;
$scope.sortReverse = false;
}

$scope.history.sort(function(a, b) {
if (a[column] < b[column]) {
return $scope.sortReverse ? 1 : -1;
} else if (a[column] > b[column]) {
return $scope.sortReverse ? -1 : 1;
} else {
return 0;
}
});
};
$scope.toggleSortOrder = function(column, currentSortOrder) {
if ($scope.activeColumn === column) {
$scope.sortReverse = !currentSortOrder;
} else {
$scope.activeColumn = column;
$scope.sortReverse = false;
}
}
});
84 changes: 81 additions & 3 deletions app/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ searchModule("BYO DID Numbers", "byo-did-numbers", ['byo', 'did numbers', 'did',
'extensions': [
'extensions',
'extension-create',
'extension-edit'
'extension-edit',
'history'
],
'recordings': [
'recordings'
Expand Down Expand Up @@ -1428,6 +1429,12 @@ var regParams = {
controller: 'ExtensionsCtrl',
params: listPageParams
})
.state('history', {
url: '/extension/{extensionId}/history?page&search',
parent: 'dashboard',
templateUrl: 'views/pages/history.html',
controller: 'HistoryCtrl',
})
.state('extension-create', {
url: '/extension/create',
parent: 'dashboard',
Expand Down Expand Up @@ -4796,12 +4803,12 @@ angular.module('Lineblocs').controller('ExtensionsCtrl', function ($scope, Backe
$scope.$shared = $shared;
$scope.pagination = pagination;
$scope.Backend = Backend;

function DialogController($scope, $mdDialog, extension, $shared) {
$scope.$shared = $shared;
$scope.extension = extension;
$scope.close = function() {
$mdDialog.hide();
$mdDialog.hide();
}
}
$scope.settings = {
Expand All @@ -4828,6 +4835,9 @@ angular.module('Lineblocs').controller('ExtensionsCtrl', function ($scope, Backe
$scope.createExtension = function(extension) {
$state.go('extension-create', {});
}
$scope.historyInfo = function(extension) {
$state.go('history', {extensionId: extension.public_id});
}
$scope.connectInfo = function($event, extension) {
$mdDialog.show({
controller: DialogController,
Expand Down Expand Up @@ -5311,6 +5321,74 @@ angular.module('Lineblocs').controller('FlowsCtrl', function ($scope, Backend, p
});


'use strict';

/**
* @ngdoc function
* @name Lineblocs.controller:MainCtrl
* @description
* # MainCtrl
* Controller of Lineblocs
*/
angular.module('Lineblocs').controller('HistoryCtrl', function ($scope, Backend, pagination, $location, $state, $shared, $q, $stateParams) {
$shared.updateTitle("History");
$scope.$stateParams = $stateParams;
$scope.$shared = $shared;
$scope.pagination = pagination;
$scope.Backend = Backend;
$shared.isLoading = false;
$scope.history = [
{
"from": "123-202-3030",
"to": "123-222-3030",
"call_duration": 36,
"direction": "incoming",
"status": "Answered"
},
{
"from": "122-202-3030",
"to": "123-202-3030",
"call_duration": 1806,
"direction": "outgoing",
"status": "Rejected"
},
{
"from": "121-202-3030",
"to": "123-102-3030",
"call_duration": 1254,
"direction": "incoming",
"status": "Busy"
}
];

$scope.sortColumn = function(column) {
if ($scope.activeColumn === column) {
$scope.sortReverse = !$scope.sortReverse;
} else {
$scope.activeColumn = column;
$scope.sortReverse = false;
}

$scope.history.sort(function(a, b) {
if (a[column] < b[column]) {
return $scope.sortReverse ? 1 : -1;
} else if (a[column] > b[column]) {
return $scope.sortReverse ? -1 : 1;
} else {
return 0;
}
});
};
$scope.toggleSortOrder = function(column, currentSortOrder) {
if ($scope.activeColumn === column) {
$scope.sortReverse = !currentSortOrder;
} else {
$scope.activeColumn = column;
$scope.sortReverse = false;
}
}
});

'use strict';

/**
Expand Down
2 changes: 1 addition & 1 deletion app/styles/app.min.css

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions app/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,99 @@ span.spacer {
color: #109c10;
}

.green-icon {
color: green;
}

.red-icon {
color: red;
}

.extension-history{
padding: 10px;
}

.history-title{
padding: 12px;
}

.custom-container {
border-radius: 8px;
}

.table-header-history{
height: 34px !important;
background-color: #f5f5f5;
}

th[md-column] {
font-weight: bold;
text-align: left;
padding: 8px 16px;
cursor: pointer;
user-select: none;
}

th[md-column].active {
color: #007bff;
}

th[md-column].active i {
opacity: 1;
}

th[md-column].active.desc i.mdi-menu-up {
opacity: 0.5;
}

th[md-column].active:not(.desc) i.mdi-menu-down {
opacity: 0.5;
}

th[md-column] i {
margin-left: 8px;
opacity: 0.3;
}

th[md-column] i.text-muted {
color: #6c757d !important;
}

th[md-column] i.text-primary {
color: #007bff !important;
opacity: 1;
margin-top: -6px;
}

.arrow-icon{
font-size: 24px;
}

.arrow-icon-both{
font-size: 15px;
margin-top: -11px;
}

.call-arrow{
display: flex;
margin-top: 8px;
}

.text-muted-call{
color: #6c757d !important;
}

.text-primary-call{
color: #007bff !important;
}

.column-header{
margin-top: 5px;
}

.call-direction{
font-size: 24px;
}
.pricing-plan-container{
margin-left: auto;
margin-right: auto;
Expand Down
12 changes: 10 additions & 2 deletions app/views/pages/extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h5>No extensions found</h5>
</md-button>
<md-button ng-click="deleteExtension($event, extension)" class="md-icon-button" aria-label="Settings">
<md-icon >

<i class="mdi mdi-delete"></i>
<md-tooltip class="helper-tooltip" md-direction="top">
Delete this item
Expand All @@ -103,6 +103,14 @@ <h5>No extensions found</h5>
</md-tooltip>
</md-icon>
</md-button>
<md-button ng-click="historyInfo(extension)" class="md-icon-button" aria-label="Settings">
<md-icon >
<i class="mdi mdi-history"></i>
<md-tooltip class="helper-tooltip" md-direction="top">
View History Info
</md-tooltip>
</md-icon>
</md-button>
</td>
</tr>
</tbody>
Expand All @@ -119,4 +127,4 @@ <h5>No extensions found</h5>
</div>
</div>
</div>
</div>
</div>
Loading