Commit f4ba80b7 by Torkel Ödegaard

worked on full screen edit mode

parent d446887e
...@@ -29,7 +29,7 @@ function (angular, config, _) { ...@@ -29,7 +29,7 @@ function (angular, config, _) {
var module = angular.module('kibana.controllers'); var module = angular.module('kibana.controllers');
module.controller('DashCtrl', function( module.controller('DashCtrl', function(
$scope, $route, ejsResource, fields, dashboard, alertSrv, panelMove, esVersion) { $scope, $rootScope, $route, ejsResource, fields, dashboard, alertSrv, panelMove, esVersion) {
$scope.requiredElasticSearchVersion = ">=0.20.5"; $scope.requiredElasticSearchVersion = ">=0.20.5";
...@@ -61,6 +61,14 @@ function (angular, config, _) { ...@@ -61,6 +61,14 @@ function (angular, config, _) {
$scope.reset_row(); $scope.reset_row();
$scope.ejs = ejsResource(config.elasticsearch); $scope.ejs = ejsResource(config.elasticsearch);
$rootScope.$on('fullEditMode', function(evt, enabled) {
$scope.fullEditMode = enabled;
});
};
$scope.closeFullEdit = function() {
$rootScope.$emit('fullEditMode', false);
}; };
$scope.isPanel = function(obj) { $scope.isPanel = function(obj) {
......
...@@ -37,7 +37,7 @@ function (angular) { ...@@ -37,7 +37,7 @@ function (angular) {
'</span>' + '</span>' +
'<span class="row-button extra" ng-show="panel.editable != false">' + '<span class="row-button extra" ng-show="panel.editable != false">' +
'<span bs-modal="\'app/partials/paneleditor.html\'" class="pointer">'+ '<span bs-modal="\'app/partials/paneleditor.html\'" class="pointer" ng-click="openConfigureModal($event)" >'+
'<i class="icon-cog pointer" bs-tooltip="\'Configure\'"></i></span>'+ '<i class="icon-cog pointer" bs-tooltip="\'Configure\'"></i></span>'+
'</span>' + '</span>' +
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span12"> <div class="span12">
<input type="text" ng-model="target.target" class="input-large" style="width:95%" ng-change="render()" /> <input type="text" ng-model="target.target" class="input-large" style="width:95%" ng-model-onblur ng-change="get_data()" />
<i ng-click="panel.targets = _.without(panel.targets, target)" class="pointer icon-remove" style="position: relative; top: -5px; left: 5px;"></i> <i ng-click="panel.targets = _.without(panel.targets, target)" class="pointer icon-remove" style="position: relative; top: -5px; left: 5px;"></i>
</div> </div>
</div> </div>
......
<div ng-controller='graphite' ng-init="init()" style="min-height:{{panel.height || row.height}}"> <div ng-controller='graphite' ng-init="init()" style="min-height:{{panel.height || row.height}}" ng-class='{"panel-full-edit-mode": inEditMode}'>
<style> <style>
.histogram-legend { .histogram-legend {
display:inline-block; display:inline-block;
...@@ -32,6 +32,23 @@ ...@@ -32,6 +32,23 @@
.form-inline .checkbox { .form-inline .checkbox {
display: inline-block; display: inline-block;
} }
.full-edit-mode {
//display: none;
}
.panel-full-edit-mode {
z-index: 1500;
display: block;
position: fixed;
left: 20px;
right: 20px;
top: 100px;
outline: 1px solid #101214;
border-top: 1px solid #3e444c;
padding: 0 10px 10px 10px;
background: #202328;
}
</style> </style>
<div> <div>
<span ng-show='panel.options'> <span ng-show='panel.options'>
......
...@@ -35,7 +35,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) { ...@@ -35,7 +35,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
var module = angular.module('kibana.panels.graphite', []); var module = angular.module('kibana.panels.graphite', []);
app.useModule(module); app.useModule(module);
module.controller('graphite', function($scope, querySrv, dashboard, filterSrv) { module.controller('graphite', function($scope, $rootScope, querySrv, dashboard, filterSrv) {
$scope.panelMeta = { $scope.panelMeta = {
modals : [ modals : [
{ {
...@@ -383,6 +383,24 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) { ...@@ -383,6 +383,24 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv) {
}); });
}; };
$scope.openConfigureModal = function($event) {
$event.preventDefault();
$event.stopPropagation();
var closeEditMode = $rootScope.$on('fullEditMode', function(evt, enabled) {
$scope.inEditMode = enabled;
if (!enabled) {
closeEditMode();
}
setTimeout(function() {
$scope.$emit('render');
}, 200);
});
$rootScope.$emit('fullEditMode', true);
};
// I really don't like this function, too much dom manip. Break out into directive? // I really don't like this function, too much dom manip. Break out into directive?
$scope.populate_modal = function(request) { $scope.populate_modal = function(request) {
$scope.inspector = angular.toJson(request,true); $scope.inspector = angular.toJson(request,true);
......
...@@ -13,6 +13,15 @@ ...@@ -13,6 +13,15 @@
<div class="container-fluid main"> <div class="container-fluid main">
<div class="row-fluid"> <div class="row-fluid">
<div class="row-fluid container" style="margin-top:10px; width:98%"> <div class="row-fluid container" style="margin-top:10px; width:98%">
<!-- Full edit mode -->
<div class="row-fluid kibana-row" ng-show="fullEditMode" style="text-align: center; z-index: 1500; position: absolute; background-color: #272b30">
<h5>
Configure Panel
<i ng-click="closeFullEdit()" class="pointer icon-remove" style="position: relative; top: 0px; left: 15px;"></i>
</h5>
</div>
<div ng-show="fullEditMode" class="modal-backdrop fade in"></div>
<!-- Rows --> <!-- Rows -->
<div class="row-fluid kibana-row" ng-controller="RowCtrl" ng-repeat="(row_name, row) in dashboard.current.rows" ng-style="row_style(row)"> <div class="row-fluid kibana-row" ng-controller="RowCtrl" ng-repeat="(row_name, row) in dashboard.current.rows" ng-style="row_style(row)">
<div class="row-control"> <div class="row-control">
......
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
</head> </head>
<body ng-cloak> <body ng-cloak ng-class="{'full-edit-mode': fullEditMode}">
<link rel="stylesheet" ng-href="css/bootstrap.{{dashboard.current.style||'dark'}}.min.css"> <link rel="stylesheet" ng-href="css/bootstrap.{{dashboard.current.style||'dark'}}.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css"> <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment