Skip to content

Commit

Permalink
Merge pull request #226 from Alfresco/development
Browse files Browse the repository at this point in the history
v.1.1.0
  • Loading branch information
Denys Vuika authored Mar 12, 2018
2 parents cc02993 + 08765be commit 2bd57f4
Show file tree
Hide file tree
Showing 103 changed files with 5,992 additions and 2,912 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
26 changes: 18 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dist: trusty
sudo: false
sudo: required

language: node_js
node_js:
Expand All @@ -9,15 +9,25 @@ cache:
directories:
- ./node_modules


before_install:
- export CHROME_BIN=chromium-browser
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
services:
- docker

install:
- npm install

script:
- xvfb-run -a npm run test -- --single-run --no-progress --browser=ChromeNoSandbox
#- xvfb-run -a npm run e2e -- --no-progress --config=protractor-ci.conf.js
- npm run build
- npm run test -- --single-run --no-progress && cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage && rm -rf ./coverage

# Send coverage data to codecov
after_success:
- bash <(curl -s https://codecov.io/bash) -X gcov
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- export TAG=`if [ "$BRANCH" == "master" ]; then echo "latest"; else echo $BRANCH ; fi`
- sed -i 's/{:port}/:8080/1' ./dist/app.config.json
- docker build -t $DOCKER_REPO:$TAG .
# Publish extra image based on Travis build number
- docker tag $DOCKER_REPO:$TAG $DOCKER_REPO:travis-$TRAVIS_BUILD_NUMBER
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker push $DOCKER_REPO
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ with a simple and easy to use interface for working with files stored in the Alf

[Public documentation](https://alfresco.github.io/alfresco-content-app/)

### Raising issues and feature requests

Log any issues in the ['ACA' JIRA project](https://issues.alfresco.com/jira/projects/ACA),
please include a clear description, steps to reproduce and screenshots where appropriate.

All issues will be reviewed; bugs will be categorized if reproducible and enhancement/feature suggestions
will be considered against existing priorities if the use case serves a general-purpose need.

## Development server

Run `npm start` for a dev server. Navigate to `http://localhost:3000/` (opens by default).
Expand Down
58 changes: 3 additions & 55 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ with a simple and easy to use interface for working with files stored in the Alf

This application uses the latest releases from Alfresco:

- [Alfresco ADF version 2.0](https://community.alfresco.com/community/application-development-framework/pages/get-started)
- [Alfresco Content Services version 5.2.2](https://www.alfresco.com/platform/content-services-ecm)
- [Alfresco Community Edition 201707](https://www.alfresco.com/products/community/download)
- [Alfresco ADF version 2.2](https://community.alfresco.com/community/application-development-framework/pages/get-started)
- [Alfresco Content Services version 5.2.3](https://www.alfresco.com/platform/content-services-ecm)
- [Alfresco Community Edition 201802 EA](https://www.alfresco.com/products/community/download)

<p class="warning">
You also need <a href="https://nodejs.org/en/" target="_blank">node.js</a> (8.9.1 or later) installed to build it locally from source code.
Expand All @@ -28,58 +28,6 @@ You also need <a href="https://nodejs.org/en/" target="_blank">node.js</a> (8.9.
The latest version of the Alfresco Content platform is required
due to the application using the latest [REST APIs](https://docs.alfresco.com/5.2/pra/1/topics/pra-welcome.html) developments.

## Where to get help

There are several ways to get help with building applications using the Alfresco Application Development Framework:

### Alfresco DevCon 2018

DevCon 2018 is an international developer conference entirely dedicated to Alfresco technology.
With the support of our community, customers, and partners, DevCon will increase your technical know-how,
connect you with other Alfresco developers, and let you collaborate with our team and each other.

Register now to avoid disappointment, places are limited:
http://devcon.alfresco.com/

### Alfresco Community

Visit the Alfresco Community space where you can find many resources to help you get started building your application,
along with blog posts from the Alfresco developers and much more:
https://community.alfresco.com/community/application-development-framework

### Alfresco ADF Gitter

Join the vibrant community in Gitter where you can chat with experienced developers,
including the Alfresco employees working directly on the ADF and this example application project:
https://gitter.im/Alfresco/alfresco-ng2-components

### Alfresco Developer Support

Developer Support is a subscription-based support offering delivered remotely
by a dedicated team of development-focused, senior Support Engineers.
This support offering is best for customers and partners that require on-going support
for their development teams and customized code.

Visit the Developer Support Services section on the Alfresco website for more information:
https://www.alfresco.com/alfresco-developer-support-services

### Alfresco University

Training with Alfresco University is the best way to acquire the right skills for your team to deliver a successful Alfresco implementation.
The most cost-effective way to take advantage of this valuable training is through Alfresco University Passport.

Visit the Alfresco University section on the Alfresco website for more information:
https://www.alfresco.com/alfresco-university

## Building and running locally

Please refer to the [developer docs](/build) to get more details on building and running application on your local machine.

## Using with Docker

The Content App provides a "Dockerfile" and "docker-compose" files to aid in running application in a container.
Please refer to the "[Using with Docker](/docker)" article for more details.

## Contribution Policy

### How to contribute
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ You can change the default settings of the pagination that gets applied to all t
```json
{
...,
"document-list": {
"pagination": {
"supportedPageSizes": [
25,
50,
Expand Down
26 changes: 24 additions & 2 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ This article assumes you are familiar with Docker and know how to create images

You can create a Docker image to run Alfresco Content App in the container.

## Using public Docker images

You can find all latest images for ACA in the [alfresco-content-app]( https://hub.docker.com/r/alfresco/alfresco-content-app/) DockerHub repository.

### Tags

- `latest`: latest stable release (`master` branch), available with 1.1 release or later
- `development`: most recent code (`development` branch)

In addition, there are images for feature branches, pull requests and Travis CI builds.

### Example

You can run latest `development` build locally with the following command:

```sh
docker run -p 3000:80 alfresco/alfresco-content-app:development
```

The default image expects an ACS 5.2.2 or later running at port `8080`.
You may also need CORS settings to be applied for your ACS installation or image.

## Building from source code

You need to run the following commands to build the project from the source code:
Expand Down Expand Up @@ -35,10 +57,10 @@ docker image build -t content-app .
To run the image locally, you can use the following command:

```sh
docker container run -p 80:80 --rm content-app
docker container run -p 8888:80 --rm content-app
```

Navigate to "http://localhost" to access the running application.
Navigate to "http://localhost:8888" to access the running application.

## Docker Compose file

Expand Down
43 changes: 43 additions & 0 deletions docs/file-viewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
### File Viewer

The File Viewer has been created using the [ViewerComponent](https://alfresco.github.io/adf-component-catalog/components/ViewerComponent.html) from the ADF. The Viewer has four main areas:

![](images/File-Viewer.png)

#### Header & Toolbar (1)
The Header & Toolbar section of the viewer contains a number of features that relate to the file currently being displayed:
- Close 'X' will return the user to the folder that contains the file.
- The name and file type icon is shown in the middle.
- Next and previous buttons will be displayed either side of the file name so that users can navigate to other files in the folder without navigating away from the viewer.
- Finally, on the right hand side an actions toolbar provides users with the ability to download, favorite, move, copy and delete.

#### Content (2)
The File Viewer consists of four separate views that handle displaying the content based on four types of content, covering various [file/mime](https://alfresco.github.io/adf-component-catalog/components/ViewerComponent.html#supported-file-formats) types:

- Document View: PDFs are displayed in the application File Viewer, for other document types (DOCX etc) then a PDF rendition is automatically retrieved.
- Image View: JPEG, PNG, GIF, BMP and SVG images are natively displayed in the application File Viewer.
- Media View: MP4, MP3, WAV, OGG and WEBM files are played natively application File Viewer. The File Viewer will download, by default, 50MB of the content at a time to ensure a smooth playback of the content.
- Text View: TXT, XML, JS, HTML, JSON and TS files are natively displayed as text in the application File Viewer.

#### Thumbnails side pane (3)
The Document View includes a thumbnails pane which can be activated by a button in the Viewer Actions toolbar. Clicking on a thumbnail will take a user directly to the selected page and as users scroll through a document the current page is highlighted in the pane.

#### Viewer Controls (4)
At the bottom of the content the Viewer Controls allow users to interact with the content in various ways; the actions available are dependant on the type of content being displayed.

- Document View:
- Activate/Deactivate thumbnails pane
- Previous/Next page
- Jump to page number
- Zoom in/out
- Fit to page
- Image View:
- Zoom in/out
- Rotate left/right (does not alter content in the repository)
- Reset image
- Media View:
- Play/pause
- Timeline position
- Audio mute/unmute
- Audio volume
- Full screen
42 changes: 42 additions & 0 deletions docs/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Where to get help

There are several ways to get help with building applications using the Alfresco Application Development Framework:

## Alfresco Community

Visit the Alfresco Community space where you can find many resources to help you get started building your application,
along with blog posts from the Alfresco developers and much more:
https://community.alfresco.com/community/application-development-framework

## Alfresco ADF Gitter

Join the vibrant community in Gitter where you can chat with experienced developers,
including the Alfresco employees working directly on the ADF and this example application project:
https://gitter.im/Alfresco/alfresco-ng2-components

## Alfresco Developer Support

Developer Support is a subscription-based support offering delivered remotely
by a dedicated team of development-focused, senior Support Engineers.
This support offering is best for customers and partners that require on-going support
for their development teams and customized code.

Visit the Developer Support Services section on the Alfresco website for more information:
https://www.alfresco.com/alfresco-developer-support-services

## Alfresco University

Training with Alfresco University is the best way to acquire the right skills for your team to deliver a successful Alfresco implementation.
The most cost-effective way to take advantage of this valuable training is through Alfresco University Passport.

Visit the Alfresco University section on the Alfresco website for more information:
https://www.alfresco.com/alfresco-university

# Building and running locally

Please refer to the [developer docs](/build) to get more details on building and running application on your local machine.

# Using with Docker

The Content App provides a "Dockerfile" and "docker-compose" files to aid in running application in a container.
Please refer to the "[Using with Docker](/docker)" article for more details.
Binary file added docs/images/File-Viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
{
title: 'Document List',
path: 'doc-list'
},
{
title: 'File Viewer',
path: 'file-viewer'
}
]
},
Expand Down Expand Up @@ -77,6 +81,10 @@
path: 'navigation'
}
]
},
{
title: 'Get Help',
path: 'help'
}
],
icons: [
Expand Down
16 changes: 12 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,26 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['ChromeHeadless'],
customLaunchers: {
ChromeNoSandbox: {
ChromeHeadless: {
base: 'Chrome',
flags: ['--no-sandbox']
flags: [
'--no-sandbox',
'--headless',
'--disable-gpu',
'--remote-debugging-port=9222'
]
}
},
singleRun: false,

captureTimeout: 180000,
browserDisconnectTimeout: 180000,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 300000
browserNoActivityTimeout: 300000,

// workaround for alfresco-js-api builds
webpack: { node: { fs: 'empty', } }
});
};
Loading

0 comments on commit 2bd57f4

Please sign in to comment.