Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Add help for actions #794

Merged
merged 10 commits into from
Jul 27, 2017
4 changes: 3 additions & 1 deletion smart-zeppelin/zeppelin-web/src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var zeppelinWebApp = angular.module('zeppelinWebApp', [

$routeProvider
.when('/', {
templateUrl: 'app/home/home.html'
templateUrl: 'app/dashboard/views/cluster/cluster_hottestFiles.html'
})
.when('/notebook/:noteId', {
templateUrl: 'app/notebook/notebook.html',
Expand Down Expand Up @@ -250,10 +250,12 @@ var zeppelinWebApp = angular.module('zeppelinWebApp', [
.constant('conf', {
restapiProtocol: 'v1',
restapiRoot: 'http://localhost:8080/',
// restapiRoot: rootPath,
restapiQueryInterval: 3 * 1000, // in milliseconds
restapiQueryTimeout: 30 * 1000, // in milliseconds
restapiTaskLevelMetricsQueryLimit: 100,
loginUrl: 'http://localhost:8080/' + 'login'
// loginUrl: rootPath + 'login'
})
.constant('TRASH_FOLDER_ID', '~Trash');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ <h4 ng-bind="dialogTitle"></h4>
<span>Action type</span>
</label>
<div class="col-sm-9">
<select id="actionList" class="form-control" ng-model="data.model">
<select id="actionList" class="form-control" ng-model="data.model" ng-change="updateUsage(data.model)">
<option ng-repeat="action in data.actions" value="{{action.actionName}}">{{action.displayName}}</option>
</select>
</div>
</div>
<!-- input 2 -->
<form-control
type="text" label="Action arguments"
ng-model="launchArgs"></form-control>
<form-control id="action-args"
type="text" label="Arguments"
ng-model="launchArgs" help="{{usage}}" style="white-space: nowrap"></form-control>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ angular.module('zeppelinWebApp')
'use strict';

$scope.dialogTitle = 'Submit Action';
$scope.usage = 'Usage:';

var submitFn = restapi.submitAction;
$scope.canSubmit = true;
Expand All @@ -32,6 +33,14 @@ angular.module('zeppelinWebApp')
actions: actionTypes.body
};

$scope.updateUsage = function (model) {
$scope.data.actions.forEach(function (type) {
if (type.actionName === model) {
$scope.usage = 'Usage: ' + type.usage;
}
});
};

$scope.submit = function () {
$scope.uploading = true;
submitFn($scope.data.model, $scope.launchArgs, function (response) {
Expand Down
9 changes: 6 additions & 3 deletions smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#/">
<img style="margin-top: -7px;" src="assets/images/zepLogoW.png" width="50" alt="I'm smart" /> Smart
<a class="navbar-brand" href="#/cluster/hotTestFiles">
<!--<img style="margin-top: -7px;" src="assets/images/zepLogoW.png" width="50" alt="I'm smart" /> -->
Smart
</a>
</div>

Expand Down Expand Up @@ -133,15 +134,17 @@ <h4 class="modal-title">About Smart</h4>
<div class="row about">
<div class="hidden-xs col-sm-4 logo">
<img src="assets/images/zepLogo.png" alt="Smart" title="Smart" />
<small>Powered by Apache Zeppelin!</small>
</div>
<div class="col-xs-12 col-sm-8 content">
<h3>Smart</h3>
<br/>
<br/>
<span id="i18n-14">Version</span>
{{zeppelinVersion}}
<br/>
<br/>
<a href="http://zeppelin.apache.org/" target="_blank"><span id="i18n-15">Get involved!</span></a>
<a href="https://github.com/Intel-bigdata/SSM" target="_blank"><span id="i18n-15">Get involved!</span></a>
<br/>
<a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank"><span id="i18n-16">Licensed under the Apache License, Version 2.0</span></a>
</div>
Expand Down