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

Commit

Permalink
Smart notebook (#862)
Browse files Browse the repository at this point in the history
* merge the 'zeppelin' app.js to 'trunk'.

* Change button style of rules (#747)

* Add tooltip for action (#765)

* Fix #741 Remove the usage of view

* change button to phglyphicon, start and stop button combine into one

* add tooltip

* add tooltip for rules and actions

* Change home.html (#786)

* Fix #741 Remove the usage of view

* change button to phglyphicon, start and stop button combine into one

* add tooltip

* add tooltip for rules and actions

* change home.html

* change about smart modal content

* Add help for actions (#794)

* #778 Add Rule format description on UI (#810)

* Fix #741 Remove the usage of view

* change button to phglyphicon, start and stop button combine into one

* add tooltip

* add tooltip for rules and actions

* change home.html

* change about smart modal content

* add help for actions

* #778 Add Rule format description on UI

* #778 Add Rule format description on UI

* #778 Add Rule format description on UI

* #778 Add Rule format description on UI

* Add SmartNotebook (#831)

* Add SmartNotebook

* Add SmartNotebook

* Fix build bugs and web UI

* change the home page.
  • Loading branch information
zhiqiang authored Aug 3, 2017
1 parent 939a371 commit a72c14c
Show file tree
Hide file tree
Showing 64 changed files with 819 additions and 11,538 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<module>smart-engine</module>
<module>smart-server</module>
<module>smart-rule</module>
<module>smart-interpreter</module>
<module>smart-zeppelin</module>
<module>smart-agent</module>
<module>smart-hdfs</module>
Expand Down
18 changes: 18 additions & 0 deletions smart-blockec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
<artifactId>json</artifactId>
<version>20170516</version>
</dependency>
<dependency>
<groupId>org.smartdata</groupId>
<artifactId>smart-common</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
Expand Down Expand Up @@ -173,6 +179,7 @@
<javahClassName>org.smartdata.erasurecode.rawcoder.NativeRSRawDecoder</javahClassName>
<javahClassName>org.smartdata.erasurecode.rawcoder.NativeXORRawEncoder</javahClassName>
<javahClassName>org.smartdata.erasurecode.rawcoder.NativeXORRawDecoder</javahClassName>
<javahClassName>org.smartdata.erasurecode.NativeCrc32</javahClassName>
</javahClassNames>
<javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
</configuration>
Expand Down Expand Up @@ -203,6 +210,16 @@
</vars>
</configuration>
</execution>
<execution>
<id>test_bulk_crc32</id>
<goals><goal>cmake-test</goal></goals>
<phase>test</phase>
<configuration>
<binary>${project.build.directory}/native/test_bulk_crc32</binary>
<timeout>1200</timeout>
<results>${project.build.directory}/native-results</results>
</configuration>
</execution>
<execution>
<id>erasure_code_test</id>
<goals><goal>cmake-test</goal></goals>
Expand Down Expand Up @@ -282,6 +299,7 @@
<javahClassName>org.smartdata.erasurecode.rawcoder.NativeRSRawDecoder</javahClassName>
<javahClassName>org.smartdata.erasurecode.rawcoder.NativeXORRawEncoder</javahClassName>
<javahClassName>org.smartdata.erasurecode.rawcoder.NativeXORRawDecoder</javahClassName>
<javahClassName>org.smartdata.erasurecode.util.NativeCrc32</javahClassName>
</javahClassNames>
<javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
</configuration>
Expand Down
42 changes: 42 additions & 0 deletions smart-interpreter/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>smartdata-project</artifactId>
<groupId>org.smartdata</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>org.smartdata</groupId>
<artifactId>smart-interpreter</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.smartdata</groupId>
<artifactId>smart-engine</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<name>Interpreter</name>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.smartdata.interpreter;

package org.apache.zeppelin.display;
import org.smartdata.server.SmartEngine;

public class AngularObjectBuilder {
import java.io.IOException;

/**
* Created by zhiqiangx on 17-7-31.
*/
public abstract class SmartInterpreter {
private SmartEngine smartEngine;

public SmartInterpreter(SmartEngine smartEngine) {
this.smartEngine = smartEngine;
}

protected SmartEngine getSmartEngine() {
return smartEngine;
}

public abstract String excute(String cmd) throws IOException;

public static <T> AngularObject<T> build(String varName, T value, String noteId,
String paragraphId) {
return new AngularObject<>(varName, value, noteId, paragraphId, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.smartdata.interpreter.impl;

package org.apache.zeppelin
import org.smartdata.interpreter.SmartInterpreter;
import org.smartdata.server.SmartEngine;

import org.openqa.selenium.WebDriver
import org.scalatest.concurrent.Eventually._
import org.scalatest.time._
import org.scalatest.selenium.WebBrowser
import org.scalatest.{DoNotDiscover, FunSuite}
import AbstractFunctionalSuite.SERVER_ADDRESS
import java.io.IOException;

@DoNotDiscover
class WelcomePageSuite(implicit driver: WebDriver) extends FunSuite with WebBrowser {
public class ActionInterpreter extends SmartInterpreter {

test("Welcome sign is correct") {
eventually (timeout(Span(180, Seconds))) {
go to SERVER_ADDRESS
assert(find("welcome").isDefined)
public ActionInterpreter(SmartEngine smartEngine) {
super(smartEngine);
}
}

@Override
public String excute(String cmd) throws IOException {
getSmartEngine().getCmdletManager().submitCmdlet(cmd);
return "Success to add action";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.smartdata.interpreter.impl;

import org.smartdata.interpreter.SmartInterpreter;
import org.smartdata.model.RuleState;
import org.smartdata.server.SmartEngine;

import java.io.IOException;

/**
* Created by zhiqiangx on 17-7-31.
*/
public class RuleInterpreter extends SmartInterpreter {

public RuleInterpreter(SmartEngine smartEngine) {
super(smartEngine);
}

@Override
public String excute(String cmd) throws IOException {
long t =getSmartEngine().getRuleManager().submitRule(cmd, RuleState.DISABLED);
return "Success to add rule : " + t;
}
}
Loading

0 comments on commit a72c14c

Please sign in to comment.