From 6d481cabf2101882959f06e0a8070478803f17ca Mon Sep 17 00:00:00 2001 From: Huafeng Wang Date: Wed, 19 Jul 2017 13:21:57 +0800 Subject: [PATCH 1/7] Fix #741 Remove the usage of view --- .../engine/cmdlet/HazelcastExecutorService.java | 12 ++++++------ .../server/engine/rule/RuleExecutor.java | 6 +++--- .../java/org/smartdata/metastore/MetaStore.java | 17 ++++------------- .../smartdata/metastore/dao/AccessCountDao.java | 4 ++-- .../metastore/dao/AccessCountTable.java | 14 +++++++------- .../metastore/dao/AccessCountTableManager.java | 2 +- .../dao/TestAccessCountTableManager.java | 2 +- .../java/org/smartdata/server/SmartDaemon.java | 2 +- 8 files changed, 25 insertions(+), 34 deletions(-) diff --git a/smart-engine/src/main/java/org/smartdata/server/engine/cmdlet/HazelcastExecutorService.java b/smart-engine/src/main/java/org/smartdata/server/engine/cmdlet/HazelcastExecutorService.java index 032f2a8a758..b0f03ac92d1 100644 --- a/smart-engine/src/main/java/org/smartdata/server/engine/cmdlet/HazelcastExecutorService.java +++ b/smart-engine/src/main/java/org/smartdata/server/engine/cmdlet/HazelcastExecutorService.java @@ -67,7 +67,7 @@ public HazelcastExecutorService(CmdletManager cmdletManager) { } private void initChannels() { - for (Member worker : HazelcastUtil.getWorkerMembers(this.instance)) { + for (Member worker : HazelcastUtil.getWorkerMembers(instance)) { ITopic topic = instance.getTopic(WORKER_TOPIC_PREFIX + worker.getUuid()); this.masterToWorkers.put(worker.getUuid(), topic); this.scheduledCmdlets.put(worker.getUuid(), new HashSet()); @@ -76,7 +76,7 @@ private void initChannels() { public List getStandbyServers() { List infos = new ArrayList<>(); - for (Member worker : HazelcastUtil.getWorkerMembers(this.instance)) { + for (Member worker : HazelcastUtil.getWorkerMembers(instance)) { infos.add(new StandbyServerInfo(worker.getUuid(), worker.getAddress().toString())); } return infos; @@ -95,10 +95,10 @@ public boolean canAcceptMore() { @Override public void execute(LaunchCmdlet cmdlet) { String[] members = masterToWorkers.keySet().toArray(new String[0]); - String memeber = members[random.nextInt() % members.length]; - masterToWorkers.get(memeber).publish(cmdlet); - scheduledCmdlets.get(memeber).add(cmdlet.getCmdletId()); - LOG.info(String.format("Executing cmdlet %s on worker %s", cmdlet.getCmdletId(), members)); + String member = members[random.nextInt() % members.length]; + masterToWorkers.get(member).publish(cmdlet); + scheduledCmdlets.get(member).add(cmdlet.getCmdletId()); + LOG.info("Executing cmdlet {} on worker {}", cmdlet.getCmdletId(), members); } @Override diff --git a/smart-engine/src/main/java/org/smartdata/server/engine/rule/RuleExecutor.java b/smart-engine/src/main/java/org/smartdata/server/engine/rule/RuleExecutor.java index f4ee500ea15..65013bae09c 100644 --- a/smart-engine/src/main/java/org/smartdata/server/engine/rule/RuleExecutor.java +++ b/smart-engine/src/main/java/org/smartdata/server/engine/rule/RuleExecutor.java @@ -209,7 +209,7 @@ private List getAccessCountTablesDuringLast(long lastInterval) { + accTables.size() + " tables:"); int idx = 1; for (AccessCountTable t : accTables) { - LOG.debug(idx + ". " + (t.isView() ? " [VIEW] " : " ") + LOG.debug(idx + ". " + (t.isEphemeral() ? " [TABLE] " : " ") + t.getTableName() + " "); } } @@ -220,8 +220,8 @@ private List getAccessCountTablesDuringLast(long lastInterval) { for (AccessCountTable t : accTables) { tableNames.add(t.getTableName()); - if (t.isView()) { - dynamicCleanups.push("DROP VIEW IF EXISTS " + t.getTableName() + ";"); + if (t.isEphemeral()) { + dynamicCleanups.push("DROP TABLE IF EXISTS " + t.getTableName() + ";"); } } return tableNames; diff --git a/smart-metastore/src/main/java/org/smartdata/metastore/MetaStore.java b/smart-metastore/src/main/java/org/smartdata/metastore/MetaStore.java index 5487165c307..5b8de191dbd 100644 --- a/smart-metastore/src/main/java/org/smartdata/metastore/MetaStore.java +++ b/smart-metastore/src/main/java/org/smartdata/metastore/MetaStore.java @@ -291,8 +291,8 @@ public synchronized List getHotFiles( throw new MetaStoreException(e); } finally { for (AccessCountTable accessCountTable : tables) { - if (accessCountTable.isView()) { - this.dropView(accessCountTable.getTableName()); + if (accessCountTable.isEphemeral()) { + this.dropTable(accessCountTable.getTableName()); } } } @@ -470,11 +470,11 @@ public CachedFileStatus getCachedFileStatus( } } - public void createProportionView(AccessCountTable dest, + public void createProportionTable(AccessCountTable dest, AccessCountTable source) throws MetaStoreException { try { - accessCountDao.createProportionView(dest, source); + accessCountDao.createProportionTable(dest, source); } catch (Exception e) { throw new MetaStoreException(e); } @@ -489,15 +489,6 @@ public void dropTable(String tableName) throws MetaStoreException { } } - public void dropView(String viewName) throws MetaStoreException { - try { - LOG.debug("Drop view = {}", viewName); - metaStoreHelper.dropView(viewName); - } catch (Exception e) { - throw new MetaStoreException(e); - } - } - public void execute(String sql) throws MetaStoreException { try { LOG.debug("Execute sql = {}", sql); diff --git a/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountDao.java b/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountDao.java index 409004d4e72..b364c5263aa 100644 --- a/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountDao.java +++ b/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountDao.java @@ -133,7 +133,7 @@ private String getUnionStatement(List tables) { return union.toString(); } - public void createProportionView(AccessCountTable dest, AccessCountTable source) + public void createProportionTable(AccessCountTable dest, AccessCountTable source) throws SQLException { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); double percentage = @@ -141,7 +141,7 @@ public void createProportionView(AccessCountTable dest, AccessCountTable source) / (source.getEndTime() - source.getStartTime()); String sql = String.format( - "CREATE VIEW %s AS SELECT %s, ROUND(%s.%s * %s) AS %s FROM %s", + "CREATE TABLE %s AS SELECT %s, ROUND(%s.%s * %s) AS %s FROM %s", dest.getTableName(), AccessCountDao.FILE_FIELD, source.getTableName(), diff --git a/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTable.java b/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTable.java index 36a5396e98f..9cbcf9cfa09 100644 --- a/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTable.java +++ b/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTable.java @@ -28,23 +28,23 @@ public class AccessCountTable { private final Long startTime; private final Long endTime; private final TimeGranularity granularity; - private final boolean isView; + private final boolean isEphemeral; public AccessCountTable(Long startTime, Long endTime) { this(startTime, endTime, false); } - public AccessCountTable(Long startTime, Long endTime, boolean isView) { - this(getTableName(startTime, endTime, isView), startTime, endTime, isView); + public AccessCountTable(Long startTime, Long endTime, boolean isEphemeral) { + this(getTableName(startTime, endTime, isEphemeral), startTime, endTime, isEphemeral); } @VisibleForTesting - protected AccessCountTable(String name, Long startTime, Long endTime, boolean isView) { + protected AccessCountTable(String name, Long startTime, Long endTime, boolean isEphemeral) { this.startTime = startTime; this.endTime = endTime; this.granularity = TimeUtils.getGranularity(endTime - startTime); this.tableName = name; - this.isView = isView; + this.isEphemeral = isEphemeral; } public String getTableName() { @@ -95,7 +95,7 @@ public String toString() { this.tableName, this.startTime, this.endTime, this.granularity); } - public boolean isView() { - return isView; + public boolean isEphemeral() { + return isEphemeral; } } diff --git a/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTableManager.java b/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTableManager.java index 404b0455bf5..6858fd49e54 100644 --- a/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTableManager.java +++ b/smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTableManager.java @@ -156,7 +156,7 @@ private static List getTablesDuring( // table that already exists, so this situation should be avoided. if (!tableExists(tableDeques, startTime, table.getEndTime())) { AccessCountTable splitTable = new AccessCountTable(startTime, table.getEndTime(), true); - metaStore.createProportionView(splitTable, table); + metaStore.createProportionTable(splitTable, table); results.add(splitTable); startTime = table.getEndTime(); } diff --git a/smart-metastore/src/test/java/org/smartdata/metastore/dao/TestAccessCountTableManager.java b/smart-metastore/src/test/java/org/smartdata/metastore/dao/TestAccessCountTableManager.java index 77ff4fe5c09..17d8bc2bf05 100644 --- a/smart-metastore/src/test/java/org/smartdata/metastore/dao/TestAccessCountTableManager.java +++ b/smart-metastore/src/test/java/org/smartdata/metastore/dao/TestAccessCountTableManager.java @@ -326,7 +326,7 @@ public void testGetTablesCornerCase2() throws MetaStoreException { Constants.ONE_MINUTE_IN_MILLIS); Assert.assertTrue(result.size() == 3); Assert.assertTrue(result.get(0).equals(firstFiveSeconds)); - Assert.assertFalse(result.get(0).isView()); + Assert.assertFalse(result.get(0).isEphemeral()); Assert.assertTrue(result.get(1).equals(secondFiveSeconds)); Assert.assertTrue(result.get(2).equals(thirdFiveSeconds)); } diff --git a/smart-server/src/main/java/org/smartdata/server/SmartDaemon.java b/smart-server/src/main/java/org/smartdata/server/SmartDaemon.java index 5c07ee8add0..d6e632f1beb 100644 --- a/smart-server/src/main/java/org/smartdata/server/SmartDaemon.java +++ b/smart-server/src/main/java/org/smartdata/server/SmartDaemon.java @@ -53,7 +53,7 @@ public void becomeActive() { if (this.hazelcastWorker != null) { this.hazelcastWorker.stop(); } - //SmartServer.main(args); + SmartServer.main(args); } public static void main(String[] args) { From 2c8b2835eefa599d3d631e7b3053b6be9ccc4bf1 Mon Sep 17 00:00:00 2001 From: yanpingyou Date: Wed, 19 Jul 2017 14:43:55 +0800 Subject: [PATCH 2/7] change button to phglyphicon, start and stop button combine into one --- .../app/dashboard/views/actions/actions.js | 6 ++- .../src/app/dashboard/views/rules/rules.js | 51 +++++++++++++------ .../src/app/dashing/property/property.html | 4 +- 3 files changed, 42 insertions(+), 19 deletions(-) diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js index 353652476d2..5df615fac0e 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js @@ -82,8 +82,10 @@ angular.module('zeppelinWebApp') succeed: action.finished ? action.successful : "-", view: { href: action.pageUrl, - text: 'Show Result', - class: 'btn-xs btn-primary' + text: function() { + return 'glyphicon glyphicon-info-sign'; + }, + class: 'btn-xs btn-info' }, progress: { current: action.progress, diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js index 988262e654f..451884cfbf8 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js @@ -54,7 +54,7 @@ angular.module('zeppelinWebApp') // $stb.text('User').key('user').canSort().styleClass('col-md-2').done(), // group 3/3 (4-col) $stb.text('Status').key('status').canSort().styleClass('col-md-1 hidden-sm hidden-xs').done(), - $stb.button('Actions').key(['active', 'view', 'stop', 'delete']).styleClass('col-md-4').done() + $stb.button('Actions').key(['active', 'view', 'delete']).styleClass('col-md-4').done() ], rows: null }; @@ -76,29 +76,50 @@ angular.module('zeppelinWebApp') // stopTime: rule.finishTime || '-', status: rule.state, active: { - text: 'Start', class: 'btn-xs', disabled: (rule.isRunning || rule.isDelete), + text: function() { + if(rule.isRunning) { + return 'glyphicon glyphicon-pause'; + }else { + return 'glyphicon glyphicon-play'; + } + }, + class: 'btn-xs', + disabled: rule.isDelete, click: function () { - $dialogs.confirm('Are you sure to active this rule?', function () { - rule.start(); - }); + if(!rule.isRunning) { + $dialogs.confirm('Are you sure to active this rule?', function () { + rule.start(); + }); + }else{ + $dialogs.confirm('Are you sure to stop this rule?', function () { + rule.terminate(); + }); + } } }, view: { href: rule.pageUrl, - text: 'Details', + text: function() { + return 'glyphicon glyphicon-info-sign'; + }, class: 'btn-xs btn-info', disabled: !rule.isRunning }, - stop: { - text: 'Stop', class: 'btn-xs btn-warning', disabled: !rule.isRunning, - click: function () { - $dialogs.confirm('Are you sure to stop this rule?', function () { - rule.terminate(); - }); - } - }, + // stop: { + // text: 'glyphicon glyphicon-stop', + // class: 'btn-xs btn-warning', disabled: !rule.isRunning, + // click: function () { + // $dialogs.confirm('Are you sure to stop this rule?', function () { + // rule.terminate(); + // }); + // } + // }, delete: { - text: 'Delete', class: 'btn-xs btn-danger', disabled: rule.isDelete, + text: function() { + return 'glyphicon glyphicon-trash'; + }, + class: 'btn-xs btn-danger', + disabled: rule.isDelete, click: function () { $dialogs.confirm('Are you sure to delete this rule?', function () { rule.delete(); diff --git a/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html b/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html index 72148adb49f..e051fc1f128 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html +++ b/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html @@ -17,8 +17,8 @@ under the License. --> - + Date: Fri, 21 Jul 2017 11:14:40 +0800 Subject: [PATCH 3/7] add tooltip --- smart-zeppelin/zeppelin-web/src/app/app.js | 4 ++-- .../src/app/dashboard/views/actions/actions.js | 10 +++++++--- .../src/app/dashboard/views/rules/rules.js | 6 +++--- smart-zeppelin/zeppelin-web/src/app/dashing/dashing.js | 5 +++-- .../src/app/dashing/property/property.html | 4 ++-- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/smart-zeppelin/zeppelin-web/src/app/app.js b/smart-zeppelin/zeppelin-web/src/app/app.js index 7afd43de147..cef7a655738 100644 --- a/smart-zeppelin/zeppelin-web/src/app/app.js +++ b/smart-zeppelin/zeppelin-web/src/app/app.js @@ -249,11 +249,11 @@ var zeppelinWebApp = angular.module('zeppelinWebApp', [ // constants .constant('conf', { restapiProtocol: 'v1', - restapiRoot: rootPath, + restapiRoot: 'http://localhost:8080/', restapiQueryInterval: 3 * 1000, // in milliseconds restapiQueryTimeout: 30 * 1000, // in milliseconds restapiTaskLevelMetricsQueryLimit: 100, - loginUrl: rootPath + 'login' + loginUrl: 'http://localhost:8080/' + 'login' }) .constant('TRASH_FOLDER_ID', '~Trash'); diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js index 5df615fac0e..1ad6e4e1725 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js @@ -46,7 +46,7 @@ angular.module('zeppelinWebApp') $stb.indicator().key('state').canSort('state.condition+"_"+createTime').styleClass('td-no-padding').done(), $stb.text('ID').key('id').canSort().sortDefaultDescent().done(), $stb.text('Cmdlet ID').key('cid').canSort().done(), - $stb.text('Name').key('actionName').canSort().done(), + $stb.text('Name').key(['actionName']).canSort().done(), // $stb.link('Name').key('name').canSort('name.text').styleClass('col-md-1').done(), // group 2/3 (5-col) $stb.datetime('Create Time').key('createTime').canSort().done(), @@ -73,7 +73,7 @@ angular.module('zeppelinWebApp') // name: {href: pageUrl, text: rule.appName}, state: {tooltip: action.status, condition: action.finished ? '' : 'good', shape: 'stripe'}, //user: rule.user, - actionName: action.actionName, + actionName: {title: action.actionName, value: action.actionName}, createTime: action.createTime, finishTime: action.finished ? action.finishTime : "-", runningTime: action.uptime, @@ -82,7 +82,7 @@ angular.module('zeppelinWebApp') succeed: action.finished ? action.successful : "-", view: { href: action.pageUrl, - text: function() { + icon: function() { return 'glyphicon glyphicon-info-sign'; }, class: 'btn-xs btn-info' @@ -101,5 +101,9 @@ angular.module('zeppelinWebApp') actions0.$subscribe($scope, function (actions) { updateTable(actions); }); + + $(function () { + $("[data-toggle='tooltip']").tooltip(); + }); } diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js index 451884cfbf8..e8e365ae389 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js @@ -76,7 +76,7 @@ angular.module('zeppelinWebApp') // stopTime: rule.finishTime || '-', status: rule.state, active: { - text: function() { + icon: function() { if(rule.isRunning) { return 'glyphicon glyphicon-pause'; }else { @@ -99,7 +99,7 @@ angular.module('zeppelinWebApp') }, view: { href: rule.pageUrl, - text: function() { + icon: function() { return 'glyphicon glyphicon-info-sign'; }, class: 'btn-xs btn-info', @@ -115,7 +115,7 @@ angular.module('zeppelinWebApp') // } // }, delete: { - text: function() { + icon: function() { return 'glyphicon glyphicon-trash'; }, class: 'btn-xs btn-danger', diff --git a/smart-zeppelin/zeppelin-web/src/app/dashing/dashing.js b/smart-zeppelin/zeppelin-web/src/app/dashing/dashing.js index a7efee45e43..688aceddae3 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashing/dashing.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashing/dashing.js @@ -1614,12 +1614,13 @@ angular.module('dashing.property', [ message: 'Ignore `value.value`, because it is a reversed field.', object: value }); - delete value.value; + // delete value.value; } angular.merge($scope, value); } else if (angular.isNumber(value)) { if ($scope.renderer === renderer.NUMBER) { - $scope.raw = value; + // $scope.raw = value; + $scope.raw = value.value; } } }); diff --git a/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html b/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html index e051fc1f128..f548dba76a9 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html +++ b/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html @@ -18,7 +18,7 @@ --> + ng-click="click()" ng-disabled="disabled" ng-attr-bs-tooltip="tooltip">
-
+
{{value}}
From c5da94820182cdb9519b7b7be4a3f098e0205604 Mon Sep 17 00:00:00 2001 From: yanpingyou Date: Fri, 21 Jul 2017 16:33:40 +0800 Subject: [PATCH 4/7] add tooltip for rules and actions --- .../src/app/dashboard/views/actions/actions.js | 13 +++++++++++-- .../src/app/dashboard/views/rules/rules.js | 12 ++++++++++-- .../src/app/dashing/property/property.html | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js index 1ad6e4e1725..859e0070926 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/actions.js @@ -73,7 +73,14 @@ angular.module('zeppelinWebApp') // name: {href: pageUrl, text: rule.appName}, state: {tooltip: action.status, condition: action.finished ? '' : 'good', shape: 'stripe'}, //user: rule.user, - actionName: {title: action.actionName, value: action.actionName}, + actionName: { + title: "ID:" + action.actionId + " Cmdlet ID:" + action.cmdletId + " Name:" + action.actionName + + " Create Time:" + new Date(action.createTime).toUTCString() + + " Finish Time:" + new Date(action.finished ? action.finishTime : "-").toUTCString() + + " Running Time:" + action.uptime + "ms" + + " Succeed:" + (action.finished ? action.successful : "-"), + value: action.actionName + }, createTime: action.createTime, finishTime: action.finished ? action.finishTime : "-", runningTime: action.uptime, @@ -103,7 +110,9 @@ angular.module('zeppelinWebApp') }); $(function () { - $("[data-toggle='tooltip']").tooltip(); + $("[data-toggle='tooltip']").tooltip({ + container: body + }); }); } diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js index e8e365ae389..fff025b89a7 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/rules/rules.js @@ -42,7 +42,7 @@ angular.module('zeppelinWebApp') // group 1/3 (4-col) $stb.indicator().key('state').canSort('state.condition+"_"+submitTime').styleClass('td-no-padding').done(), $stb.text('ID').key('id').canSort().sortDefaultDescent().done(), - $stb.text('Name').key('ruleName').canSort().done(), + $stb.text('Name').key(['ruleName']).canSort().done(), // $stb.link('Name').key('name').canSort('name.text').styleClass('col-md-1').done(), // group 2/3 (5-col) $stb.datetime('Submission Time').key('submitTime').canSort().done(), @@ -67,7 +67,15 @@ angular.module('zeppelinWebApp') // name: {href: pageUrl, text: rule.appName}, state: {tooltip: rule.state, condition: rule.isRunning ? 'good' : '', shape: 'stripe'}, //user: rule.user, - ruleName: rule.ruleName, + ruleName: { + value: rule.ruleName, + title: "ID:" + rule.id + " Name:" + rule.ruleName + + " Submission Time:" + new Date(rule.submitTime).toUTCString() + + " Last Check Time:" + new Date(rule.lastCheckTime).toUTCString() + + " Checked Number:" + rule.numChecked + + " Cmdlets Generated:" + rule.numCmdsGen + + " Status:" + rule.state + }, submitTime: rule.submitTime, lastCheckTime: rule.lastCheckTime, numChecked: rule.numChecked, diff --git a/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html b/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html index f548dba76a9..9b1cec636c1 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html +++ b/smart-zeppelin/zeppelin-web/src/app/dashing/property/property.html @@ -30,5 +30,5 @@ ng-attr-readable="{{readable}}">
-
{{value}}
+
From 65200ad422127be50b1e02507d4138028bbad406 Mon Sep 17 00:00:00 2001 From: yanpingyou Date: Wed, 26 Jul 2017 16:03:46 +0800 Subject: [PATCH 5/7] change home.html --- smart-zeppelin/zeppelin-web/src/app/app.js | 4 +++- .../zeppelin-web/src/components/navbar/navbar.html | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/smart-zeppelin/zeppelin-web/src/app/app.js b/smart-zeppelin/zeppelin-web/src/app/app.js index cef7a655738..e26b7a9cf30 100644 --- a/smart-zeppelin/zeppelin-web/src/app/app.js +++ b/smart-zeppelin/zeppelin-web/src/app/app.js @@ -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', @@ -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'); diff --git a/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html b/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html index 1afddfb0597..86a0da0b339 100644 --- a/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html +++ b/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html @@ -18,8 +18,9 @@ - - I'm smart Smart + + + Smart From 30ee65452381c04c3cd11c368b04c928322cd23f Mon Sep 17 00:00:00 2001 From: yanpingyou Date: Wed, 26 Jul 2017 16:21:32 +0800 Subject: [PATCH 6/7] change about smart modal content --- smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html b/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html index 86a0da0b339..5107780821a 100644 --- a/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html +++ b/smart-zeppelin/zeppelin-web/src/components/navbar/navbar.html @@ -134,15 +134,17 @@
From 5885cf9ca3020b3b5e1e3fb9c1ff8bcc53c335cf Mon Sep 17 00:00:00 2001 From: yanpingyou Date: Thu, 27 Jul 2017 14:37:53 +0800 Subject: [PATCH 7/7] add help for actions --- .../src/app/dashboard/views/actions/submit/submit.html | 8 ++++---- .../src/app/dashboard/views/actions/submit/submit.js | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.html b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.html index 665454dc6c3..5b1328250ef 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.html +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.html @@ -52,15 +52,15 @@

Action type
-
- + diff --git a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.js b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.js index 0d963849d0a..c51d866ea20 100644 --- a/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.js +++ b/smart-zeppelin/zeppelin-web/src/app/dashboard/views/actions/submit/submit.js @@ -23,6 +23,7 @@ angular.module('zeppelinWebApp') 'use strict'; $scope.dialogTitle = 'Submit Action'; + $scope.usage = 'Usage:'; var submitFn = restapi.submitAction; $scope.canSubmit = true; @@ -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) {