Skip to content

Commit

Permalink
Adding Similar Items to the detail page
Browse files Browse the repository at this point in the history
Similar Items is a simple directive that calls the extsimilar custom endpoint.

Merge pull request marklogic-community#123 from bluetorch/similar-items

Similar items

updating to latest bower dependencies
fixing failing vet

making things version agnostic

Merge pull request marklogic-community#122 from paxtonhare/update-bower-deps-again

updating to latest bower dependencies

updating css designs. adding separate files. added classes to the root and search files

Merge branch 'master' of https://github.com/marklogic/slush-marklogic-node

Merge pull request marklogic-community#121 from jenbreese/master

updating css designs. adding separate files. added classes to the roo…

Increased version number

Add snippet size control

marklogic-community#130 Address PR comment, now use ctrl.

marklogic-community#130 Only use the URI as the search result title. Further discussion to come

Merge pull request marklogic-community#130 from mariannemyers/snippet-size

Add snippet size control

Move login out as service and add httpintercept for login prompt

Make login a POST, instead of a GET request

Make adjustments for the top-right login option

Add user directive and service changes for login

Don't allow params to build when linking from the homepage

Make sure redirects happen for top-right and modal

Merge pull request marklogic-community#127 from ryanjdew/login-service

Move login out as service and add httpintercept for login prompt

Providing scripts/docs to run app as service

Merge pull request marklogic-community#129 from bluetorch/run-as-service

Providing scripts/docs to run app as service

Fix user tests to reflect login service changes

Merge pull request marklogic-community#150 from ryanjdew/user-tests

Fix user tests to reflect login service changes

Update installation instructions in README

Fixes marklogic-community#89 by adding Ruby to the list of dependencies

Also, add some Windows-specific Roxy commands, which I discovered while
working with an SE

Also, changed the documentation for `gulp serve-dev` to use the command
line options rather than changes to the gulpfile itself, assuming we fix
this as described in marklogic-community#135. We will need to revisit this documentation if
we create a single-point-of-information as described in marklogic-community#151

Merge pull request marklogic-community#154 from patrickmcelwee/readme_installation

Update installation instructions in README

Prompts for ports and overwrites in gulp.config.js and
node-express-service. Also fixes files to properly look at gulp.config.js

Merge pull request marklogic-community#113 from hunterwilliams/port-specification

Allow ports to be specified via prompts. marklogic-community#103

Added negated facets in by default. Added new version of ml-search-ng to
bower.json and included the less file in main.less

Merge pull request marklogic-community#125 from hunterwilliams/negated-facet-support

Allow negated facets to work

Adds MarkLogic's newest favicon and adds it to index.html

Merge pull request marklogic-community#155 from hunterwilliams/favicon

Adds a favicon and adds it to index.html

Do not ask for appname twice

Fixes marklogic-community#133

Also, make it optional on the command line

Merge pull request marklogic-community#153 from patrickmcelwee/do_not_ask_for_appname_twice

Do not ask for appname twice

Fixed marklogic-community#84: minor patch for analyze-data to support JSON

Merge pull request marklogic-community#173 from grtjn/84-analyze-json

Fixed marklogic-community#84: minor patch for analyze-data to support JSON

Fixed marklogic-community#148: stub mlpm.json to make mlpm install slightly easier

Merge pull request marklogic-community#164 from grtjn/148-mlpm-json

Fixed marklogic-community#148: stub mlpm.json to make mlpm install slightly easier

Added generated CHANGELOG

Fixed marklogic-community#144: fixed issue with add/remove tags on create page

Merge pull request marklogic-community#166 from grtjn/144-fix-tags

Fixed marklogic-community#144: fixed issue with add/remove tags on create page

Changed sample docs out for a sample zip. Changed instructions in readme
on how to load

Changed mlcp commands to add collections/perms as well as use options file

Updated relevant content in main readme.mdown. Also fixed doc count/extra
instruction. Also fix options for proper naming/permissions

Emphasized the app-role change necessity and added command to find it

Better data distribution. More eyeColors/fruits

Merge pull request marklogic-community#157 from hunterwilliams/more-sample-docs

Added more sample docs

Fixed marklogic-community#85: added robots.txt

Merge pull request marklogic-community#172 from grtjn/85-robots-txt

Fixed marklogic-community#85: added robots.txt

Fixed marklogic-community#147: added similar sidebar to esri details, synched presentation between esri/no-esri

Merge pull request marklogic-community#165 from grtjn/147-similar-esri

Fixed marklogic-community#147: added similar sidebar to esri details, synched presentation between esri/no-esri

Fixes marklogic-community#160: added collection facet, added comments, removed verbose search: prefix

Merge pull request marklogic-community#163 from grtjn/160-collection-facet

Fixes marklogic-community#160: added collection facet, added comments, removed verbose search: prefix

Updated CHANGELOG

Added no-cache headers to requests on get/post/put & login/user status
calls

Moved nocache into function and added legacy nocache headers

Merge pull request marklogic-community#158 from hunterwilliams/no-cache

No Cache Requests

Made it so that search options query on data collection, similar docs only
look in similar collections, and docs created go into the correct collections

Merge pull request marklogic-community#162 from hunterwilliams/data-search

Made it so that search options query on data collection, similar docs…

Fixed marklogic-community#135: handle app-port arg properly, only open debug port when debug flag

Merge pull request marklogic-community#170 from grtjn/135-gulp-app-port

Fixed marklogic-community#135: handle app-port arg properly, only open debug port when debug flag

fixed issue marklogic-community#149 and marklogic-community#142. also removed the extra spacing on the login page.

fixing the colors for all designs per bug marklogic-community#171

adding the missing logo for marklogic-community#156

removed the powered by that did not fit the design standards from Marketing marklogic-community#156

removed the powered by in the footer because the logo cannot be on a dark background per design standards

Merge pull request marklogic-community#174 from jenbreese/master

fixed issue marklogic-community#149 and marklogic-community#142.

Fixed lint error and made tag test work properly

Merge pull request marklogic-community#179 from hunterwilliams/create-controller-fix

CreateController - Fixed lint error and made tag test work properly

removing the redunant unused style and adding height marklogic-community#156

Merge pull request marklogic-community#181 from jenbreese/master

removing the redunant unused style and adding height marklogic-community#156

Adds app name to session variable. Slushfile now replaces `@sample-app`

Moved replace to correct package.json

Generate a uuid for secret each slush generation

Synched verions in json, made them private, added replacing title to index
and another json

Merge pull request marklogic-community#180 from hunterwilliams/app-secret

Fixes marklogic-community#64 - App secret

updating the chiclets to show an icon with ban/add

minor edit to marklogic-community#182 to put back the default design

Merge pull request marklogic-community#182 from jenbreese/master

updating the chiclets to show an icon with ban/add

changing the layout for tags marklogic-community#144

Merge pull request marklogic-community#186 from jenbreese/master

changing the layout for tags marklogic-community#144

Made it so that the emails can't be added if blank and that they add on
submission if not pressed + button

@grtjn suggested changes

Merge pull request marklogic-community#183 from hunterwilliams/email-fix

Fixes marklogic-community#145

# This is a combination of 9 commits.
# The first commit's message is:
Made it so gulpfile will be able to handle different env serve

# This is the 2nd commit message:

Made it look for json properties

# This is the 3rd commit message:

added writing gulp-local.json. Added to ignore file

# This is the 4th commit message:

removed configuring node service

# This is the 5th commit message:

Updated readme to reflect new commands for gulp serve-*

# This is the 6th commit message:

Made it so that local.properties is written with ports vs build.properties

# This is the 7th commit message:

Changed path of file to be in root. Also made it ask for host

# This is the 8th commit message:

Made it so undefined error won't pop up. Also changed message

# This is the 9th commit message:

Changed ml-port to ml-http-port. Also made it so it doesn't need xccport
for ml8

Made gulp use a gulp-{env}.json file and added choosing the hostname to
install process. Also took advantage of ml8 optimization not to need an
XCC server when using roxy

Merge pull request marklogic-community#185 from hunterwilliams/seperate-config

marklogic-community#151 Single Config

Fixed marklogic-community#67,marklogic-community#176: minor changes to proxying to smoothen things a bit

Merge pull request marklogic-community#177 from grtjn/31-67-176-proxy

Fixed marklogic-community#31,marklogic-community#67,marklogic-community#176: minor changes to proxying to smoothen things a bit

Moves over status check from userservice to loginservice. Does not resolve
promise before variable is needed currently

Made it so userservice will properly ask loginservice to check if logged
in. Still have issue with loginservice not getting is authenticated in
time..

Fixes getting logged in before page load. Breaks stopping requests quickly

Merge remote-tracking branch 'upstream/master' into login-status-fix

Protected root.search by default....

Fixed login test

Added comment and removed console.warn

Merge branch 'master' into login-status-fix

Merge pull request marklogic-community#168 from hunterwilliams/login-status-fix

marklogic-community#141 PR - Login Service Changes/Fix

Undoing show-more change, see marklogic-community#137

Merge pull request marklogic-community#190 from grtjn/137-disable-show-more

Undoing show-more change, see marklogic-community#137

Fixed marklogic-community#193: show result.label if exists

Get ahead of ml-search-ng release for label support.

Merge pull request marklogic-community#196 from marklogic/193-result-label

Fixed marklogic-community#193: show result.label if exists

Fixed marklogic-community#195: typo in MLCP command

Merge pull request marklogic-community#198 from marklogic/195-mlcp-typo

Fixed marklogic-community#195: typo in MLCP command

Fixed marklogic-community#195: typo in MLCP command

Merge pull request marklogic-community#199 from marklogic/195-mlcp-typo-1

Fixed marklogic-community#195: typo in MLCP command

Fixed typo in PR for marklogic-community#195

Merge pull request marklogic-community#202 from marklogic/fixed-typo-for-195

Fixed typo in PR for marklogic-community#193

Removed using deprecated express send method

Merge pull request marklogic-community#204 from hunterwilliams/deprecated-express

marklogic-community#201 Removed using deprecated express send method

Binary corruption fix in gulp replace

Merge pull request marklogic-community#203 from hunterwilliams/binary-corruption

marklogic-community#194 Binary corruption fix in gulp replace

Made it so that app-user and admin-user now live in local.json and are
respected within node

Fixed using gulp-local.json to local.json

Made admin password blank by default and adds message

Merge pull request marklogic-community#192 from hunterwilliams/user-fix

marklogic-community#191 Users in local.json fix

Fixed details page to display xml and json data when applicable.

Adding details page that handles xml, json.

fixed angular dependency

changed look of tabsets to pills, added bottom margin, changed font family in xml to monospace
  • Loading branch information
janmichaelyu committed Sep 24, 2015
1 parent 16dd7fc commit baf109f
Show file tree
Hide file tree
Showing 106 changed files with 3,316 additions and 1,456 deletions.
5 changes: 4 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"globals": {
"angular": false,
"google": false,
"$": false
"$": false,
"_": false,
"vkbeautify" : false,
"X2JS" : false
}
}
178 changes: 178 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

32 changes: 27 additions & 5 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@ components:
- [gulp](http://gulpjs.com/): Javascript task automation (`npm install -g
gulp`)
- [Slush](http://slushjs.github.io/): Application generation tool (`npm install
-g slush`)
-g slush`) - only needed if you are generating the initial code
- [Bower](http://bower.io/): A package manager for front-end libraries (`npm
install -g bower`)
- [Git](https://git-scm.com/) - Roxy depends on this version control system
- [Ruby](https://www.ruby-lang.org/en/documentation/installation/) - Roxy
depends on Ruby in order to run server configuration scripts

## Install the generator

npm install -g slush-marklogic-node

If you prefer to use the latest code under development:

npm install -g git://github.com/marklogic/slush-marklogic-node.git

## Run the generator

Go to the directory where your new project will be created (the parent). Then:
Expand All @@ -53,15 +59,24 @@ server, an app-user, and a role for that user).
./ml local bootstrap
./ml local deploy modules

On Windows, that would be:

ml.bat local bootstrap
ml.bat local deploy modules

Install additional dependencies using the bower package manager:

bower install

Edit the `_loginMode` variable in `ui/app/login/login.service.js` to change the login mode of the application. The default is set to `full`. The other options are `top-right` or `modal`.

## Run your application

Edit `gulp.config.js` to set your desired ports
gulp serve-local # this will watch the .less file for changes, compile them to .css, and run the node server

gulp serve-dev # this will watch the .less file for changes, compile them to .css, and run the node server
You can set some settings to match your setup in the Roxy properties files. For example:

gulp serve-local --ml-host=<your-host> --ml-http-port=8234 --app-port=9234 --nosync

# Next Steps

Expand All @@ -85,11 +100,18 @@ page.

## Sample Data

The application comes with 25 JSON documents generated by json-generator.com.
The application comes with 3000 JSON documents generated by json-generator.com.
You can load them with
(MLCP)[https://docs.marklogic.com/guide/ingestion/content-pump] like this:

./ml local mlcp import -input_file_path sample-data -document_type json
**NOTE:** Change $app-role in import-sample-data.options to your app's role
(You can discover that with `./ml local info`)

./ml local mlcp -options_file import-sample-data.options

Or on Windows:

ml.bat local mlcp -options_file import-sample-data.options

## General Data Information

Expand Down
71 changes: 66 additions & 5 deletions app/templates/README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,93 @@ This application was generated by the MarkLogic-Node [Slush](https://github.com/
- [node.js](http://nodejs.org/): very thin layer, hosting the Angular code and proxying MarkLogic REST API requests
- [Roxy Deployer](https://github.com/marklogic/roxy): bootstrap MarkLogic databases, application servers, etc; scaffolding for MarkLogic REST API service extensions

## Install Required Dependencies

- [node.js](http://nodejs.org/download/)
- [npm](https://www.npmjs.com/): Built-in package manager for node (comes with
node, but check to be sure you have latest version: `npm install -g npm`)
- [gulp](http://gulpjs.com/): Javascript task automation (`npm install -g
gulp`)
- [Bower](http://bower.io/): A package manager for front-end libraries (`npm
install -g bower`)
- [Git](https://git-scm.com/) - Roxy depends on this version control system
- [Ruby](https://www.ruby-lang.org/en/documentation/installation/) - Roxy
depends on Ruby in order to run server configuration scripts

# Running the application

./ml local bootstrap
./ml local deploy modules

On Windows, that would be:

ml.bat local bootstrap
ml.bat local deploy modules

Install additional dependencies using the bower package manager:

bower install

If you want to upload a dictionary for spell-suggestions:

./ml local deploy content
./ml local deploy content

On Windows:

ml.bat local deploy content

Edit `./local.json` to set your desired ports

gulp serve-local # this will watch the .less file for changes, compile them to .css, and run the node server

# Installing as service

The code includes a service script, and a service config to make installing express server service as easy as possible. The following files are involved:

- etc/init.d/node-express-service (generic express server service script)
- etc/{app}/conf.sh (application specific service configuration, any application name allowed)
- boot.js (entry point for express service, calls out to server.js)
- node-app.js (required by boot.js)

Edit `gulp.config.js` to set your desired ports
The conf.sh is 'sourced' by the service script, and allows overriding the built-in defaults. Usually you only need to override SOURCE\_DIR, APP\_PORT, and ML\_PORT. Make sure they match the appropriate environment.

gulp serve-dev # this will watch the .less file for changes, compile them to .css, and run the node server
Next install [forever](https://www.npmjs.com/package/forever) globally if it is not already installed.

- `$ [sudo] npm install forever -g`

Next, push all source files to the appropriate server. The following assumes it was dropped under /space/projects/ in a folder called slush-app.live. Take these steps to install the services:

- cd /space/projects/slush-app.live
- gulp build # this will create the ./dist/ folder with all the required assests and code
- cd /etc
- sudo ln -s /space/projects/slush-app.live/etc/{env} slush-app
- cd /etc/init.d
- sudo ln -s /space/projects/slush-app.live/etc/init.d/node-express-service slush-app
- sudo chkconfig --add slush-app
- sudo chkconfig --levels 2345 slush-app on

Next to start it, use the following commands (from any directory):

- sudo service slush-app start

These services will also print usage without param, but they support info, restart, start, status, and stop. The info param is very useful to check the settings.

# Data

## Sample Data

The application comes with 25 JSON documents generated by json-generator.com.
The application comes with 3000 JSON documents generated by json-generator.com.
You can load them with
(MLCP)[https://docs.marklogic.com/guide/ingestion/content-pump] like this:

./ml local mlcp import -input_file_path sample-data -document_type json
**NOTE:** Change $app-role in import-sample-data.options to your app's role
(You can discover that with `./ml local info`)

./ml local mlcp -options_file import-sample-data.options

Or on Windows:

ml.bat local mlcp -options_file import-sample-data.options

## General Data Information

Expand Down
1 change: 1 addition & 0 deletions app/templates/_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bower_components
ui/fonts
ui/styles/*.css
deploy/local.properties
gulp-local.json
/dist
.DS_Store
*.pid
Expand Down
4 changes: 3 additions & 1 deletion app/templates/_jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"angular": false,
"google": false,
"$": false,
"_": false
"_": false,
"vkbeautify" : false,
"X2JS" : false
}
}
20 changes: 20 additions & 0 deletions app/templates/boot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*jshint node:true*/
'use strict';

var args = {};
process.argv.forEach(function(arg, index, array) {
//console.log('argv['+index+']=' + arg);
if (arg.match(/^--([^=]+)=(.*)$/)) {
var key = arg.replace(/^--([^=]+)=(.*)$/, '$1');
var val = arg.replace(/^--([^=]+)=(.*)$/, '$2');
args[key] = val;
}
});


process.env['NODE_ENV'] = args['node-env'] || 'build';
process.env['PORT'] = args['app-port'] || 9040;
process.env['ML_HOST'] = args['ml-host'] || 'localhost';
process.env['ML_PORT'] = args['ml-port'] || 8040;

require(args['server-script'] || './node-server/node-app.js');
23 changes: 15 additions & 8 deletions app/templates/bower.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
{
"name": "ml-node-seed",
"name": "@sample-app",
"version": "0.0.0",
"dependencies": {
"angular": "~1.4.3",
"angular": "~1.4.4",
"angular-bootstrap": "~0.13.3",
"angular-cookies": "~1.4.3",
"angular-cookies": "~1.4.4",
"angular-highlightjs": "~0.4.3",
"angular-mocks": "~1.4.4",
"angular-ui-router": "~0.2.15",
"angular-ui-tinymce": "~0.0.9",
"angular-x2js": "https://github.com/janmichaelyu/angular-x2js.git",
"bootstrap": "~3.3.5",
"font-awesome": "~4.4.0",
"highlightjs": "~8.7.0",
"jquery": "~2.1.4",
"lodash": "~3.10.1",
"ml-search-ng": "0.1.0",
"ml-common-ng": "~0.0.6",
"ml-search-ng": "~0.2.0",
"ml-utils": "withjam/ml-utils",
"ng-json-explorer": "8c2a0f9104",
"angular-mocks": "~1.4.3"
"vkbeautify-wrapper": "*"
},
"devDependencies": {
"angular-mocks": "1.4.3",
"sinon": "http://sinonjs.org/releases/sinon-1.15.4.js",
"bardjs": "~0.1.5"
"angular-mocks": "~1.4.4",
"sinon": "http://sinonjs.org/releases/sinon-1.16.1.js",
"bardjs": "~0.1.8"
},
"private": true,
"resolutions": {
"angular": "1.4.6"
}
}
Loading

0 comments on commit baf109f

Please sign in to comment.