Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- app.controller('FirewallCtrl', ['$scope', '$http', '$modal', '$resource', 'DTOptionsBuilder', 'DTColumnDefBuilder', 'toastr', 'ManagerVersionService',
- function ($scope, $http, $modal, $resource, DTOptionsBuilder, DTColumnDefBuilder, toastr, ManagerVersionService) {
- $scope.Test = 'Data is testing'
- var vm = this;
- var LinkGetListFirewall = 'http://localhost:53073/Apps/Firewall/data.txt';
- $scope.ReloadData = function (filter) {
- /// <summary>
- /// Function reload Data
- /// </summary>
- vm.Items = $resource(LinkGetListFirewall, {}, { 'query': { method: 'GET', isArray: false } }).query(function (msg) {
- var Data = {};
- Data.data = msg;
- }, function (error) {
- // error handler
- toastr.error('Hệ thống bị lỗi, liên hệ với quản trị hệ thống!', 'Hệ thống')
- });
- };
- //Get Data first time
- $scope.ReloadData();
- vm.dtOptions = DTOptionsBuilder.newOptions()
- .withPaginationType('full_numbers')
- .withDisplayLength(5)
- .withDOM('rtp<"m-t-xs pull-left"f>')
- // Active Responsive plugin
- .withOption('responsive', true)
- .withBootstrap()
- .withBootstrapOptions({
- TableTools: {
- classes: {
- container: 'btn-group',
- buttons: {
- normal: 'btn-pxl btn-icon'
- }
- }
- },
- pagination: {
- classes: {
- ul: 'pagination pagination-sm'
- }
- }
- })
- .withTableTools('Libs/datatables/TableTools/swf/copy_csv_xls_pdf.swf')
- .withColumnFilter();
- vm.dtColumnDefs = [
- DTColumnDefBuilder.newColumnDef(0),
- DTColumnDefBuilder.newColumnDef(1),
- DTColumnDefBuilder.newColumnDef(2),
- DTColumnDefBuilder.newColumnDef(3),
- DTColumnDefBuilder.newColumnDef(4),
- DTColumnDefBuilder.newColumnDef(5),
- DTColumnDefBuilder.newColumnDef(6),
- DTColumnDefBuilder.newColumnDef(7),
- DTColumnDefBuilder.newColumnDef(8).withClass('none'),
- DTColumnDefBuilder.newColumnDef(9).notSortable()
- ];
- $scope.SetDataTransfer = function (Data) {
- ManagerVersionService.DataTransfer = Data;
- }
- }])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement