ZEPPELIN-612 Add 'Configuration' page

* which shows key/value pairs of configuration
This commit is contained in:
Jungtaek Lim 2016-01-16 23:10:02 +09:00
parent 400de0245f
commit c341f828c8
6 changed files with 157 additions and 0 deletions

View file

@ -66,6 +66,10 @@
templateUrl: 'app/interpreter/interpreter.html',
controller: 'InterpreterCtrl'
})
.when('/configuration', {
templateUrl: 'app/configuration/configuration.html',
controller: 'ConfigurationCtrl'
})
.when('/search/:searchTerm', {
templateUrl: 'app/search/result-list.html',
controller: 'SearchResultCtrl'

View file

@ -0,0 +1,36 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
angular.module('zeppelinWebApp').controller('ConfigurationCtrl', function($scope, $route, $routeParams, $location,
$rootScope, $http, baseUrlSrv) {
$scope.configrations = [];
$scope._ = _;
var getConfigurations = function() {
$http.get(baseUrlSrv.getRestApiBase()+'/configurations/all').
success(function(data, status, headers, config) {
$scope.configurations = data.body;
}).
error(function(data, status, headers, config) {
console.log('Error %o %o', status, data.message);
});
};
var init = function() {
getConfigurations();
};
init();
});

View file

@ -0,0 +1,63 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.configurationHead {
margin: -10px -10px 20px;
padding: 10px 15px 15px 15px;
background: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
border-bottom: 1px solid #E5E5E5;
}
.configurationHead .header {
font-family: 'Roboto', sans-serif;
}
.configuration .configuration-title {
font-size: 20px;
font-weight: bold;
color: #3071a9;
float: left;
margin-top: 0;
}
.configuration ul {
margin: 0;
padding: 0;
}
.configuration .configurationInfo {
list-style-type: none;
}
.configuration table tr .configurationPropertyKey {
padding : 5px 5px 5px 5px;
}
.configuration table tr .configurationPropertyValue {
padding : 5px 5px 5px 5px;
display: block;
max-height: 100px;
overflow-y: auto;
}
.configuration h5 {
font-weight: bold;
}
.new_h3 {
margin-top: 1px;
padding-top: 7px;
float: left;
}

View file

@ -0,0 +1,50 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="configurationHead">
<div class="header">
<div class="row">
<div class="col-md-12">
<h3 class="new_h3">
Configurations
</h3>
</div>
</div>
<div class="row">
<div class="col-md-12">
Shows current configurations for Zeppelin Server.
</div>
</div>
</div>
</div>
<div class="box width-full home">
<div>
<div class="row configuration">
<div class="col-md-12">
<table class="table table-striped">
<thead>
<tr>
<th style="width:30%">name</th>
<th>value</th>
</tr>
</thead>
<tr ng-repeat="(key, value) in configurations" >
<td>{{key}}</td>
<td>{{value}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>

View file

@ -42,6 +42,9 @@ limitations under the License.
<li>
<a href="#/interpreter">Interpreter</a>
</li>
<li>
<a href="#/configuration">Configuration</a>
</li>
</ul>

View file

@ -134,6 +134,7 @@ limitations under the License.
<script src="app/home/home.controller.js"></script>
<script src="app/notebook/notebook.controller.js"></script>
<script src="app/interpreter/interpreter.controller.js"></script>
<script src="app/configuration/configuration.controller.js"></script>
<script src="app/notebook/paragraph/paragraph.controller.js"></script>
<script src="app/search/result-list.controller.js"></script>
<script src="components/arrayOrderingSrv/arrayOrdering.service.js"></script>