Skip to content

Commit

Permalink
#145 Add support to AdminLTE theme
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Mar 15, 2017
1 parent 6b70096 commit 1f74739
Show file tree
Hide file tree
Showing 45 changed files with 6,952 additions and 812 deletions.
18 changes: 16 additions & 2 deletions ui/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<!-- endbuild -->

<!-- build:css(.tmp) styles/app.css -->
<link rel="stylesheet" href="styles/vendors/AdminLTE.css">
<link rel="stylesheet" href="styles/vendors/AdminLTE-skin-blue.css">

<link rel="stylesheet" href="styles/main.css"/>
<link rel="stylesheet" href="styles/case.css"/>
<link rel="stylesheet" href="styles/flow.css"/>
Expand All @@ -39,10 +42,15 @@
<link rel="stylesheet" href="styles/directives/page-sizer.css"/>
<link rel="stylesheet" href="styles/directives/user.css"/>
<!-- endbuild -->

<style>
app-container { display: block }
</style>

</head>
<body ng-cloak>
<body ng-cloak class="hold-transition skin-blue layout-top-nav">
<page-loader></page-loader>
<div ui-view></div>
<div ui-view></div>

<!-- build:js(.) scripts/vendor.js -->
<!-- bower:js -->
Expand Down Expand Up @@ -102,6 +110,10 @@
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<!-- injector:js -->
<script src="scripts/app.js"></script>
<script src="scripts/components/app-container.component.js"></script>
<script src="scripts/components/control-sidebar.component.js"></script>
<script src="scripts/components/header.component.js"></script>
<script src="scripts/components/main-sidebar.component.js"></script>
<script src="scripts/controllers/AboutCtrl.js"></script>
<script src="scripts/controllers/AuthenticationCtrl.js"></script>
<script src="scripts/controllers/LiveCtrl.js"></script>
Expand Down Expand Up @@ -149,6 +161,7 @@
<script src="scripts/directives/entityLink.js"></script>
<script src="scripts/directives/fileChooser.js"></script>
<script src="scripts/directives/filter-box.js"></script>
<script src="scripts/directives/fixed-height.js"></script>
<script src="scripts/directives/flow/flow-item.js"></script>
<script src="scripts/directives/flow/flow.js"></script>
<script src="scripts/directives/logEntry.js"></script>
Expand Down Expand Up @@ -214,6 +227,7 @@
<script src="scripts/services/UserSrv.js"></script>
<script src="scripts/services/UtilsSrv.js"></script>
<script src="scripts/services/VersionSrv.js"></script>
<script src="scripts/thirdparty/theme.js"></script>
<script src="scripts/utils/highlight.min.js"></script>
<script src="scripts/utils/saveSvgAsPng.js"></script>
<!-- endinjector -->
Expand Down
10 changes: 10 additions & 0 deletions ui/app/scripts/components/app-container.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function() {
'use strict';
angular.module('theHiveControllers')
.directive('appContainer', function() {
return {
restrict: 'E',
templateUrl: 'views/components/app-container.component.html'
};
});
})();
10 changes: 10 additions & 0 deletions ui/app/scripts/components/control-sidebar.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function() {
'use strict';
angular.module('theHiveControllers')
.directive('controlSidebar', function() {
return {
restrict: 'E',
templateUrl: 'views/components/control-sidebar.component.html'
};
});
})();
10 changes: 10 additions & 0 deletions ui/app/scripts/components/header.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function() {
'use strict';
angular.module('theHiveControllers')
.directive('header', function() {
return {
restrict: 'E',
templateUrl: 'views/components/header.component.html'
};
});
})();
10 changes: 10 additions & 0 deletions ui/app/scripts/components/main-sidebar.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function() {
'use strict';
angular.module('theHiveControllers')
.directive('mainSidebar', function() {
return {
restrict: 'E',
templateUrl: 'views/components/main-sidebar.component.html'
};
});
})();
3 changes: 2 additions & 1 deletion ui/app/scripts/controllers/RootCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* Controller for main page
*/
angular.module('theHiveControllers').controller('RootCtrl',
function($scope, $uibModal, $location, $state, $base64, AuthenticationSrv, MispSrv, StreamSrv, StreamStatSrv, TemplateSrv, MetricsCacheSrv, AlertSrv) {
function($scope, $uibModal, $location, $state, $base64, AuthenticationSrv, MispSrv, StreamSrv, StreamStatSrv, TemplateSrv, MetricsCacheSrv, AlertSrv, appConfig) {
'use strict';

$scope.appConfig = appConfig;
$scope.querystring = '';
$scope.view = {
data: 'currentcases'
Expand Down
28 changes: 28 additions & 0 deletions ui/app/scripts/directives/fixed-height.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
(function() {
'use strict';
angular.module('theHiveDirectives').directive('fixedHeight', function($window, $timeout) {
return {
restrict: 'A',
link: function(scope, elem, attr) {

$timeout(function() {
var windowHeight = $(window).height();
var footerHeight = $('.main-footer').outerHeight();
var headerHeight = $('.main-header').height();

elem.css('min-height', windowHeight - headerHeight - footerHeight);
}, 500);

angular.element($window).bind('resize', function() {
var windowHeight = $(window).height();
var footerHeight = $('.main-footer').outerHeight();
var headerHeight = $('.main-header').height();

elem.css('min-height', windowHeight - headerHeight - footerHeight);
});

}
}
});

})();
Loading

0 comments on commit 1f74739

Please sign in to comment.