Skip to content

Commit 3cf67e9

Browse files
committed
Merge branch 'master' into dino/197-Refactor-to-autodeploy
* master: fixing bug in restoring previous load options removing unused files - updating readme - adding appveyor yaml tweaking the form validation Added default input file path in loading data Used angular.forEach instead of jQuery's $.each - Fixed issue in saving options and loading of previous options - Also added validation for missing input file path Changes to fix JS errors in Swagger UI in master enhance performance of hub install pointing build status to correct link cleaning up logging in tests adding appveyor build status for windows 1.0.0-beta.4 release Cleaned up Load UI Fixed unit tests on Windows fixed #89 - refactored mlcp to use mlcp-util from @rjrudin - removed RunInputFlow from the DataHub class and jar. It doesn't make sense to live there - removed the dependencies on ngMaterial because it was conflicting with bootstrap ui - removed unused files to reduce the size of the final quick-start jar - fixed compile errors in Groovy Tasks - added some mlcp options to the load dialog - added the ability to copy the mlcp command to the clipboard - added .. to the directory list to navigate back up - made the "hover over labels" info less "in your face" - updated the MarkLogic Data Hub Banner to fit on smaller terminal windows - broke out mlcp loading stuff in the UI into its own module - moved the download mlcp options to be client side only - updated the saving of current mlcp properties to use json (compatible with mlcp-util) Removed automatic closing of notification Conflicts: marklogic-data-hub/src/main/java/com/marklogic/hub/DataHub.java quick-start/src/main/resources/static/app/services/dataHubService.js
2 parents 8f2203b + bed7cf9 commit 3cf67e9

File tree

117 files changed

+1154
-126787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1154
-126787
lines changed

CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
# Change Log
22

3-
## [v1.0.0-beta.3](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-beta.3)
3+
## [v1.0.0-beta.4](https://github.com/marklogic/marklogic-data-hub/tree/HEAD)
44

5+
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-beta.3...v1.0.0-beta.4)
6+
7+
**Implemented enhancements:**
8+
9+
- Minor improvements to Load Data Feature [\#205](https://github.com/marklogic/marklogic-data-hub/issues/205)
10+
11+
**Fixed bugs:**
12+
13+
- File permission error running hadoop to do data load [\#89](https://github.com/marklogic/marklogic-data-hub/issues/89)
14+
15+
**Closed issues:**
16+
17+
- Rename conform/conformance to harmonize [\#201](https://github.com/marklogic/marklogic-data-hub/issues/201)
18+
- Errors only flash on the GUI for a short time [\#192](https://github.com/marklogic/marklogic-data-hub/issues/192)
19+
- Investigate MLCP UI for creating MLCP cmd line options [\#164](https://github.com/marklogic/marklogic-data-hub/issues/164)
20+
- Examples need demo scripts [\#99](https://github.com/marklogic/marklogic-data-hub/issues/99)
21+
- DataHub.installUserModules should be "syncUserModules" [\#45](https://github.com/marklogic/marklogic-data-hub/issues/45)
22+
23+
**Merged pull requests:**
24+
25+
- Fix mlcp windows issue 89 [\#215](https://github.com/marklogic/marklogic-data-hub/pull/215) ([paxtonhare](https://github.com/paxtonhare))
26+
- 192 - Removed automatic closing of notification [\#208](https://github.com/marklogic/marklogic-data-hub/pull/208) ([maeisabelle](https://github.com/maeisabelle))
27+
28+
## [v1.0.0-beta.3](https://github.com/marklogic/marklogic-data-hub/tree/v1.0.0-beta.3) (2016-04-15)
529
[Full Changelog](https://github.com/marklogic/marklogic-data-hub/compare/v1.0.0-beta.2...v1.0.0-beta.3)
630

731
**Merged pull requests:**

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,19 @@ $ cd marklogic-data-hub
4646
$ git remote add upstream git://github.com/marklogic/marklogic-data-hub.git
4747
```
4848

49-
All bug fixes and new features go into the dev branch.
50-
5149
We ask that you open an issue in the [issue tracker][] and get agreement from
5250
at least one of the project maintainers before you start coding.
5351

5452
Nothing is more frustrating than seeing your hard work go to waste because
5553
your vision does not align with that of a project maintainer.
5654

57-
5855
#### Create a branch for your changes
5956

6057
Okay, so you have decided to fix something. Create a feature branch
6158
and start hacking:
6259

6360
```sh
64-
$ git checkout -b my-feature-branch -t origin/dev
61+
$ git checkout -b my-feature-branch -t origin/master
6562
```
6663

6764
#### Formatting code

README.md

Lines changed: 6 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,14 @@
1-
[![Build Status](https://travis-ci.org/marklogic/marklogic-data-hub.svg?branch=master)](https://travis-ci.org/marklogic/marklogic-data-hub)
1+
OS | Status
2+
--- | --- | ---
3+
Linux/Mac | [![Build Status](https://travis-ci.org/marklogic/marklogic-data-hub.svg?branch=master)](https://travis-ci.org/marklogic/marklogic-data-hub)
4+
Windows | [![Windows Build status](https://ci.appveyor.com/api/projects/status/kgj0k5na59uhkvbv?svg=true)](https://ci.appveyor.com/project/paxtonhare/marklogic-data-hub)
25

36
# MarkLogic Data Hub
47

58
Go from nothing to Enterprise Data Hub in a matter of minutes.
69

7-
810
This project allows you to deploy a skeleton Data Hub into MarkLogic. With some basic configuration you will be running an Enterprise Data Hub in no time.
911

10-
# Quick Start
11-
Want to get up and running quickly? Try the quick-start jar.
12-
13-
- Download the jar from the [releases page](https://github.com/marklogic/marklogic-data-hub/releases/latest).
14-
- Run the Jar
15-
`java -jar quick-start-1.0.0-alpha.1.jar`
16-
- Open the Quickstart Application in your browser:
17-
http://localhost:8080
18-
19-
20-
# Hacking on the Hub
21-
If you want to start hacking on the internals of the Hub then look here.
22-
23-
#### Clone the Repo
24-
First clone the repo
25-
26-
#### Building the Hub
27-
Note that the Unit tests take a very long time to run. This command skips them
28-
run: `./gradlew build -x test`
29-
30-
#### Running the Hub
31-
run: `./gradlew bootRun`
32-
33-
#### Running Tests
34-
run: `./gradlew test`
35-
36-
#### Using with an IDE
37-
##### Eclipse
38-
To generate eclipse project files run:
39-
`./gradlew eclipse`
40-
41-
Then import the project into eclipse
42-
43-
####Available Transforms
44-
Data Hub has provided several transforms that can be used when installed along with the created entities and flows in the MarkLogic server.
45-
####run-flow
46-
This transform can be used to run the flow when inserting document. It accepts the following `entity-name` and `flow-name`.
47-
48-
#####Use Cases:
49-
50-
1. Using [MarkLogic REST API PUT /v1/documents](http://docs.marklogic.com/REST/PUT/v1/documents)
51-
52-
`curl --anyauth --user <user>:<password> -X PUT -T <documentDirectory> -H "Content-type:<contentType>" 'http://<mlHost>:<port>/<version>/documents?uri=<uri>&transform=run-flow&trans:entity-name=<entityName>&trans:flow-name=<flowName>'`
53-
54-
Example:
55-
56-
`cat ./documents/employee1.xml`
57-
58-
`<employee xmlns="http://company.com/ns/employee">`
59-
`<id>1</id>`
60-
`</employee>`
61-
62-
To insert/update this document with uri '/employee1.xml' into the database 'data-hub-STAGING' (with host 'localhost' and port '8010'), given a user 'admin' with password 'admin' and rest-writer role AND to be able to run the flow 'IngestFlow' of the 'Customer' entity, run the following:
63-
64-
`curl --anyauth --user admin:admin -X PUT -T ./documents/employee1.xml -H "Content-type:application/xml" 'http://localhost:8010/LATEST/documents?uri=/employee1.xml&transform=run-flow&trans:entity-name=Customer&trans:flow-name=IngestFlow'`
65-
66-
This will create a document with uri '/employee1.xml'. The content will depend on the data format of the entity.
67-
68-
If it is JSON ('application/json'), the content will be:
69-
70-
`{`
71-
`"identifier": "/employee1.xml", `
72-
`"content": "<employee xmlns=\"http://company.com/ns/employee\">\n <id>1</id>\n</employee>"`
73-
`}`
74-
75-
Else if it is XML ('application/xml'), it will be:
12+
# Getting Started
7613

77-
`<?xml version="1.0" encoding="UTF-8"?>`
78-
`<envelope xmlns="http://marklogic.com/data-hub/envelope">`
79-
`<headers>`
80-
`</headers>`
81-
`<triples>`
82-
`</triples>`
83-
`<content>`
84-
`<employee xmlns="http://company.com/ns/employee">`
85-
`<id>1</id>`
86-
`</employee>`
87-
`</content>`
88-
`</envelope>`
14+
Head over to our [Getting Started Tutorial](http://marklogic.github.io/marklogic-data-hub/) to get up and running with the Data Hub.

appveyor.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
version: 1.0.{build}
2+
branches:
3+
only:
4+
- master
5+
image: WMF 5
6+
environment:
7+
ML_USER:
8+
secure: nioOZ/YaPcyFoqN9bVZHMllinShpPT+lG1uyi78H23c=
9+
ML_PASSWORD:
10+
secure: LaFtKimqM2zAtGUkciP5RA==
11+
ML_VERSION: 8.0-5.1
12+
install:
13+
- ps: >-
14+
function HttpPost($cookieContainer, $url, $postData) {
15+
$uri = New-Object "System.Uri" "$url"
16+
$webrequest = [System.Net.HTTPWebRequest]::Create($uri)
17+
$webrequest.CookieContainer = $cookieContainer
18+
$webrequest.ContentType = "application/x-www-form-urlencoded"
19+
$webrequest.Method = "POST"
20+
21+
$encoding = New-Object System.Text.ASCIIEncoding
22+
$bytes = $encoding.GetBytes($postData)
23+
$webrequest.ContentLength = $bytes.Length
24+
25+
$newStream = $webrequest.GetRequestStream()
26+
$newStream.Write($bytes, 0, $bytes.Length)
27+
$response = $webrequest.GetResponse().GetResponseStream()
28+
$sr = New-Object System.IO.StreamReader($response)
29+
$respTxt = $sr.ReadToEnd()
30+
$sr.Close()
31+
$response.Dispose()
32+
return $respTxt
33+
}
34+
35+
function downloadFile($cookieContainer, $url, $targetFile) {
36+
$cookie = $cookieContainer.GetCookies("https://developer.marklogic.com")[0]
37+
$cookieTxt = $cookie.NAME + "=" + $cookie.Value
38+
$wc = New-Object System.Net.WebClient
39+
$wc.Headers.Add([System.Net.HttpRequestHeader]::Cookie, $cookieTxt)
40+
$wc.DownloadFile($url, $targetFile)
41+
}
42+
43+
$cookieContainer = New-Object System.Net.CookieContainer
44+
$email = $env:ML_USER
45+
$password = $env:ML_PASSWORD
46+
$loginData = "email=$email&password=$password"
47+
48+
# Login
49+
$url = "https://developer.marklogic.com/login"
50+
$response = HttpPost $cookieContainer $url $loginData
51+
52+
# Get Download url
53+
$ver = $env:ML_VERSION
54+
$fname = "MarkLogic-$ver-amd64.msi"
55+
$url = "https://developer.marklogic.com/get-download-url"
56+
$postData = "download=/download/binaries/8.0/$fname"
57+
$response = HttpPost $cookieContainer $url $postData
58+
$json = $response | ConvertFrom-Json
59+
$downloadLink = $json.path
60+
$downloadLink = "https://developer.marklogic.com$downloadLink"
61+
62+
# Download File
63+
downloadFile $cookieContainer $downloadLink "$PSScriptRoot\$fname"
64+
msiexec /i "$PSScriptRoot\$fname" /quiet /qn /norestart /log install.log
65+
Start-Sleep -s 90
66+
cat .\install.log
67+
Start-Service -displayname "MarkLogic"
68+
HttpPost $cookieContainer "http://localhost:8001/admin/v1/init" ""
69+
Start-Sleep -s 10
70+
$postData = "admin-username=admin&admin-password=admin&realm=public"
71+
HttpPost $cookieContainer "http://localhost:8001/admin/v1/instance-admin" $postData
72+
Start-Sleep -s 10
73+
build: off
74+
test_script:
75+
- ps: >-
76+
c:
77+
cd \projects\marklogic-data-hub
78+
.\gradlew.bat test

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ subprojects {
1818

1919
test{
2020
testLogging{
21-
events 'started','passed', 'skipped'
21+
events 'started','passed', 'skipped', 'failed'
2222
}
2323
}
2424

examples/gradle-advanced/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
id 'eclipse'
1111
id 'idea'
1212
id 'net.saliman.properties' version '1.4.5'
13-
id 'com.marklogic.ml-data-hub-plugin' version '1.0.0-beta.3'
13+
id 'com.marklogic.ml-data-hub-plugin' version '1.0.0-beta.4'
1414
id 'com.marklogic.ml-gradle' version '2.1.0'
1515
}
1616

marklogic-data-hub/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ dependencies {
2727
compile 'com.marklogic:ml-app-deployer:2.0'
2828
compile 'commons-io:commons-io:2.4'
2929
compile 'org.apache.commons:commons-csv:1.2'
30-
compile('com.marklogic:mlcp:8.0-5') {
31-
exclude module : 'servlet-api'
32-
exclude group: 'com.google.guava', module: 'guava'
33-
}
34-
compile 'com.google.guava:guava:19.0'
30+
compile 'org.glassfish.jaxb:txw2:2.2.11'
3531
testCompile 'org.springframework.batch:spring-batch-test:3.0.6.RELEASE'
3632
testCompile 'junit:junit:4.12'
3733
testCompile 'xmlunit:xmlunit:1.3'

marklogic-data-hub/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ mlSchemasDbName=data-hub-SCHEMAS
2828

2929
hubModulesPath=exmaples/hr-hub/plugins
3030

31-
version=1.0.0-beta.3
31+
version=1.0.0-beta.4
3232

3333

0 commit comments

Comments
 (0)