Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vastbinderj committed Nov 18, 2015
2 parents 4d3f0f8 + fc64554 commit 28856e5
Show file tree
Hide file tree
Showing 602 changed files with 18,473 additions and 63,378 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ root = true

# Change these settings to your own preference
indent_style = space
indent_size = 2
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
Expand Down
22 changes: 18 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
node_modules
dist
# Folders
.idea
.tmp
.sass-cache
.vagrant
*.sublime-project
*.sublime-workspace

app/bower_components
app/scripts/main.js
app/bundle.js
app/media
.idea
.vagrant
dist
nbproject/*
node_modules
tags

# Files
*.iml
.DS_Store

# Ottemo Specific
app/scripts/config.js
dashboard.iml
51 changes: 51 additions & 0 deletions .jsbeautifyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"],
"brace_style": "collapse", // [collapse|expand|end-expand|none] Put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are
"end_with_newline": true, // End output with newline
"indent_char": " ", // Indentation character
"indent_handlebars": false, // e.g. {{#foo}}, {{/foo}}
"indent_inner_html": false, // Indent <head> and <body> sections
"indent_scripts": "keep", // [keep|separate|normal]
"indent_size": 4, // Indentation size
"max_preserve_newlines": 2, // Maximum number of line breaks to be preserved in one chunk (0 disables)
"preserve_newlines": true, // Whether existing line breaks before elements should be preserved (only works before elements, not inside tags or for text)
"unformatted": ["a", "span", "img", "code", "pre", "sub", "sup", "em", "strong", "b", "i", "u", "strike", "big", "small", "pre", "h1", "h2", "h3", "h4", "h5", "h6"], // List of tags that should not be reformatted
"wrap_line_length": 250, // Lines should wrap at next opportunity after this number of characters (0 disables)
"wrap_attributes": "force",
"wrap_attributes_indent_size": 4
},
"css": {
"allowed_file_extensions": ["css", "scss", "sass", "less"],
"end_with_newline": false, // End output with newline
"indent_char": " ", // Indentation character
"indent_size": 4, // Indentation size
"newline_between_rules": true, // Add a new line after every css rule
"selector_separator": " ",
"selector_separator_newline": true // Separate selectors with newline or not (e.g. "a,\nbr" or "a, br")
},
"js": {
"allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
"brace_style": "collapse", // [collapse|expand|end-expand|none] Put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are
"break_chained_methods": false, // Break chained method calls across subsequent lines
"e4x": false, // Pass E4X xml literals through untouched
"end_with_newline": true, // End output with newline
"indent_char": " ", // Indentation character
"indent_level": 0, // Initial indentation level
"indent_size": 4, // Indentation size
"indent_with_tabs": false, // Indent with tabs, overrides `indent_size` and `indent_char`
"jslint_happy": false, // If true, then jslint-stricter mode is enforced
"keep_array_indentation": false, // Preserve array indentation
"keep_function_indentation": false, // Preserve function indentation
"max_preserve_newlines": 2, // Maximum number of line breaks to be preserved in one chunk (0 disables)
"preserve_newlines": true, // Whether existing line breaks should be preserved
"space_after_anon_function": false, // Should the space before an anonymous function's parens be added, "function()" vs "function ()"
"space_before_conditional": true, // Should the space before conditional statement be added, "if(true)" vs "if (true)"
"space_in_empty_paren": false, // Add padding spaces within empty paren, "f()" vs "f( )"
"space_in_paren": false, // Add padding spaces within paren, ie. f( a, b )
"unescape_strings": false, // Should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65"
"wrap_line_length": 130 // Lines should wrap at next opportunity after this number of characters (0 disables)
}
}
5 changes: 3 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"strict": false, // we don't do this currently, the errors litter our hint
"sub": true,
"trailing": true
"trailing": true,
"predef": [ "angular", "JSON", "Highcharts" ]
}
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
FROM ubuntu:latest

RUN apt-get update
RUN apt-get install -y nginx git curl python-software-properties python software-properties-common
RUN apt-get install -y openssh-server nginx git curl python-software-properties python software-properties-common
RUN add-apt-repository ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get install -y nodejs
RUN npm update -g npm
RUN git clone https://github.com/ottemo/dash.git -b develop /opt/dashboard
WORKDIR /opt/dashboard
RUN git clone https://ottemo-dev:[email protected]/ottemo/dashboard.git -b develop /opt/dashboard
RUN npm update -g npm
RUN npm install
RUN npm install -g bower
RUN bower install --allow-root
Expand All @@ -24,5 +24,3 @@ ADD ./config/dashboard.conf /etc/nginx/conf.d/
RUN echo "daemon off;" >> /etc/nginx/nginx.conf

EXPOSE 80

CMD service nginx start
42 changes: 30 additions & 12 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Developer Installation Instructions
## Installation Instructions for Local Development

### Install NPM Gulp and Bower

Expand All @@ -25,22 +25,40 @@
npm install
bower install

### Initialize Git Flow
### Build project using Gulp
gulp build

### Run Client in Development Mode with Browser Reload
gulp build && gulp dev
or
gulp build && gulp serve

Note: The password to login to the dashboard will be whatever was set in the ['gulp build' step](https://github.com/ottemo/store-ng/blob/develop/INSTALL.md#build-ottemo-store-ng) for store-ng. By default this is:
```
username: admin
password: admin
```

## How to set up Git Flow on Mac/Linux

#### OSX
brew install git-flow

#### Linux
sudo apt-get install git-flow

### Initialize Git Flow in cloned Repository
git checkout master
git checkout develop
git flow init -d

### Start a Feature Branch
git flow feature start <feature-name>

### Build
gulp build

### Run Unit Tests
Not configured yet
### Issue a pull request on github
$ git push -u origin <FEATURE-BRANCH>
# if you have git aliased to hub otherwise use the github web interface
$ git pull-request -b develop

### Run Client in Development Mode
gulp build && gulp dev

### Issue Pull Request on Github
git push -u origin <feature-branch>
### Delete the local branch
$ git branch -d <FEATURE-BRANCH>
7 changes: 7 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Copyright © 2015 <Ottemo, Inc>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
77 changes: 19 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,32 @@ Dashboard

[![wercker status](https://app.wercker.com/status/0d1dbce7b17a8fc14016760e30709afc/m "wercker status")](https://app.wercker.com/project/bykey/0d1dbce7b17a8fc14016760e30709afc)


## Workflow with gulp

### Build
Builds project and moves files on the destination folder. Makes concat and minify css and JS. Compiling SASS to css. Checks JS on errors using JSHint

gulp build

### Run Client in Development Mode
Moves images, bower-files into destination folder. Compiling sass. Adds watcher on a changes in css, scss, js, html and images. After a change these files browser automatically will be update content

gulp build && gulp dev
or
gulp build && gulp serve

### Run Unit Tests
Not configured yet. Will be realized in the near future

gulp test

### Also useful are the following commands
gulp jshint // check js on errors
gulp sass // Makes compilation sass to css
gulp clean // Removes the _dist_ folder

### How start with Vagrantfile
Clone ottemo/dashboard github repo. The vagrant instance will start with nginx available at http://localhost:9999 - You can use gulp serve as well and will be available at http://localhost:9000

vagrant up
vagrant ssh
sudo su -
cd /vagrant
gulp serve (this will take a few minutes to start)

### How to run ottemo/dashboard docker container
Pull latest image from docker hub

docker pull ottemo/dashboard

Start the container and access locally access at http://localhost:9999

docker run -d -p 9999:80 -t ottemo/dashboard
[Link to our HipChat Room for Support](https://www.hipchat.com/g3BoK1Gqr)

## Contribute to Ottemo Dashboard development
Clone the repository and send us a Pull Request. There is a mini quickstart if you are new to git-flow in [INSTALL.md](INSTALL.md)

We use git-flow internally, but if you do not like git-flow you may use [this document](CONTRIBUTOR.md) as an alternative.

Below is a mini quickstart if you are new to git-flow and can't wait to jump into the code.
## Installation
There are several different ways to install and run Ottemo.

* Clone the repository, install gulp/bower, run in dev mode with `gulp serve`
* Use our Vagrant & Docker files to build a development vm

### Initialize git-flow
## License

# fork or clone ottemo like below
$ git clone https://github.com/ottemo/ottemo-go.git
[MIT License](LICENSE.md) Copyright 2015, Ottemo, Inc

# init git-flow, (git-flow must be installed for your OS locally)
$ git checkout master
$ git checkout develop
$ git flow init -d
## Terms and Conditions

### Start a feature branch
$ git flow feature start <FEATURE-NAME>
All Submissions you make to Ottemo, Inc. (“Ottemo”) through GitHub are subject
to the following terms and conditions:

### Issue a pull request on github
$ git push -u origin <FEATURE-BRANCH>
# if you have git aliased to hub otherwise use the github web interface
$ git pull-request -b develop
1. You grant Ottemo a perpetual, worldwide, non-exclusive, no charge, royalty
free, irrevocable license under your applicable copyrights and patents to
reproduce, prepare derivative works of, display, publically perform, sublicense
and distribute any feedback, ideas, code, or other information (“Submission”)
you submit through GitHub.

### Delete the local branch
$ git branch -d <FEATURE-BRANCH>
2. Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above.
21 changes: 0 additions & 21 deletions Vagrantfile

This file was deleted.

Loading

0 comments on commit 28856e5

Please sign in to comment.