├── .gitignore ├── .idea ├── .name ├── encodings.xml ├── misc.xml ├── modules.xml ├── owncloud.iml ├── php.xml ├── scopes │ └── scope_settings.xml ├── sqldialects.xml └── vcs.xml ├── .project ├── .settings └── com.aptana.editor.php.prefs ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── ldapprofile └── README.md ├── pom.xml ├── revealjs ├── Gruntfile.js ├── README.md ├── bower.json ├── package.json ├── pom.xml └── src │ ├── main │ └── php │ │ ├── README.md │ │ ├── appinfo │ │ ├── app.php │ │ ├── info.xml │ │ └── version │ │ ├── css │ │ ├── player.css │ │ ├── print.css │ │ ├── reset.css │ │ └── style.css │ │ ├── documentation.php │ │ ├── img │ │ ├── app.svg │ │ ├── impress.png │ │ ├── impressbig.png │ │ └── presentation.svg │ │ ├── index.php │ │ ├── js │ │ ├── classList.js │ │ ├── head.min.js │ │ ├── highlight.js │ │ └── reveal.js │ │ ├── lib │ │ └── reveal.php │ │ ├── player.php │ │ └── templates │ │ ├── documentation.php │ │ └── presentations.php │ └── test │ ├── php │ ├── AppTest.php │ ├── mocks_oc.php │ └── mocks_ocp.php │ └── webapp │ ├── fixtures │ └── player.html │ ├── frontend │ └── reveal.js │ ├── karma.conf.ci.js │ ├── karma.conf.js │ ├── mocks │ └── oc.js │ └── utils.js ├── roundcube ├── .bowerrc ├── Gruntfile.js ├── README.md ├── bower.json ├── package.json ├── pom.xml └── src │ ├── main │ └── php │ │ ├── adminSettings.php │ │ ├── ajax │ │ ├── adminSettings.php │ │ └── userSettings.php │ │ ├── appinfo │ │ ├── app.php │ │ ├── database.xml │ │ ├── info.xml │ │ ├── routes.php │ │ ├── update.php │ │ └── version │ │ ├── css │ │ ├── adminSettings.css │ │ ├── base.css │ │ └── userSettings.css │ │ ├── img │ │ ├── app.svg │ │ ├── loader.gif │ │ ├── mail.png │ │ └── mail.svg │ │ ├── index.php │ │ ├── js │ │ ├── adminSettings.js │ │ ├── adminSettings.oc6.js │ │ ├── adminSettings.oc7.js │ │ ├── jquery.plugins.js │ │ ├── mail.js │ │ ├── routes.js │ │ ├── settings.js │ │ └── userSettings.js │ │ ├── l10n │ │ ├── .tx │ │ │ └── config │ │ ├── de.php │ │ ├── de │ │ │ ├── de.js │ │ │ ├── de.json │ │ │ ├── roundcube.mo │ │ │ └── roundcube.po │ │ ├── es.php │ │ ├── es │ │ │ └── roundcube.po │ │ ├── fr.php │ │ ├── fr │ │ │ ├── roundcube.mo │ │ │ └── roundcube.po │ │ ├── ignorelist │ │ ├── templates │ │ │ └── roundcube.pot │ │ └── xgettextfiles │ │ ├── lib │ │ ├── MailLoginException.class.php │ │ ├── MailNetworkingException.class.php │ │ ├── MailObject.class.php │ │ ├── MailRoundCubeNotFoundException.class.php │ │ ├── RoundCubeApp.class.php │ │ ├── RoundCubeAuthHelper.class.php │ │ ├── RoundCubeDBUtil.class.php │ │ └── RoundCubeLogin.class.php │ │ ├── templates │ │ ├── part.error.autologin.php │ │ ├── part.error.db.php │ │ ├── part.error.error-settings.php │ │ ├── part.error.no-settings.php │ │ ├── part.error.wrong-auth.php │ │ ├── tpl.adminSettings.oc6.php │ │ ├── tpl.adminSettings.oc7.php │ │ ├── tpl.adminSettings.php │ │ ├── tpl.mail.php │ │ └── tpl.userSettings.php │ │ └── userSettings.php │ └── test │ ├── php │ ├── OC_RoundCube_App_IT.php │ ├── OC_RoundCube_App_Test.php │ ├── OC_RoundCube_AuthHelper_Test.php │ ├── OC_RoundCube_Login_IT.php │ ├── OC_RoundCube_Login_Test.php │ ├── RoundCubeDBUtilTest.php │ ├── UserSettingsTest.php │ ├── mocks_RoundCubeApp.php │ ├── mocks_db.php │ ├── mocks_oc.php │ └── mocks_ocp.php │ ├── resources │ ├── bootstrap.php │ └── phpunit.xml │ └── webapp │ ├── fixtures │ ├── adminSettings.html │ └── userSettings.html │ ├── frontend │ ├── mail.js │ ├── routes.js │ └── userSettings.js │ ├── karma.conf.ci.js │ ├── karma.conf.js │ ├── mocks │ ├── oc.js │ └── rc.js │ ├── test-results.xml │ └── utils.js ├── scripts └── l10n.pl ├── setupDevEnv.sh ├── src ├── main │ └── assembly │ │ └── application.xml └── site │ ├── apt │ └── index.apt │ ├── images │ ├── Roundcube_AoD.graffle │ ├── Roundcube_AoD.png │ ├── checker.png │ ├── roundcube_adminSettings.png │ ├── roundcube_adminSettings_customRoundcubeServer.png │ ├── roundcube_screenshot.png │ └── roundcube_userSettings.png │ ├── javascripts │ └── scale.fix.js │ ├── pdf.xml │ ├── site.xml │ ├── stylesheets │ ├── pygment_trac.css │ └── styles.css │ └── xdoc │ ├── ci.xml │ └── download.xml ├── storagecharts2 ├── Gruntfile.js ├── README.md ├── bower.json ├── package.json ├── pom.xml └── src │ ├── main │ ├── php │ │ ├── ajax │ │ │ ├── data.php │ │ │ └── userSettings.php │ │ ├── appinfo │ │ │ ├── app.php │ │ │ ├── database.xml │ │ │ ├── info.xml │ │ │ ├── routes.php │ │ │ └── version │ │ ├── css │ │ │ └── styles.css │ │ ├── img │ │ │ ├── app.svg │ │ │ ├── loader.gif │ │ │ └── move.png │ │ ├── index.php │ │ ├── js │ │ │ ├── chosen.jquery.min.js │ │ │ ├── chosen.proto.min.js │ │ │ ├── highcharts.min.js │ │ │ └── storagecharts2.js │ │ ├── l10n │ │ │ ├── de.php │ │ │ ├── en.php │ │ │ ├── es.php │ │ │ ├── es_ES.php │ │ │ ├── es_VE.php │ │ │ ├── fr.php │ │ │ ├── pt_BR.php │ │ │ └── ru.php │ │ ├── lib │ │ │ ├── db.class.php │ │ │ └── loader.class.php │ │ ├── settings.php │ │ └── templates │ │ │ ├── tpl.charts.php │ │ │ └── tpl.settings.php │ └── site │ │ └── site.xml │ └── test │ ├── php │ ├── AppTest.php │ ├── mocks_oc.php │ └── mocks_ocp.php │ └── webapp │ ├── fixtures │ └── storagecharts.html │ ├── frontend │ ├── chartSpec.js │ ├── unitsSpec.js │ └── userSpec.js │ ├── karma.conf.ci.js │ ├── karma.conf.js │ ├── mocks │ ├── oc.js │ └── rc.js │ └── utils.js └── webtest ├── .gitignore ├── README.md ├── pom.xml ├── serenity.properties └── src ├── main ├── docker │ └── apps │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ ├── bootstrap.sh │ │ ├── conf.yml │ │ ├── etc │ │ ├── OC60 │ │ │ ├── .htaccess │ │ │ └── config │ │ │ │ ├── config.sample.php │ │ │ │ └── config_mysql.php │ │ ├── OC70 │ │ │ ├── .htaccess │ │ │ └── config │ │ │ │ ├── .htaccess │ │ │ │ ├── config.sample.php │ │ │ │ └── config_mysql.php │ │ ├── OC80 │ │ │ ├── .htaccess │ │ │ ├── .user.ini │ │ │ └── config │ │ │ │ ├── .htaccess │ │ │ │ ├── config.sample.php │ │ │ │ └── config_mysql.php │ │ ├── OC81 │ │ │ ├── .htaccess │ │ │ ├── .user.ini │ │ │ └── config │ │ │ │ ├── .htaccess │ │ │ │ ├── config.sample.php │ │ │ │ └── config_mysql.php │ │ ├── OC82 │ │ │ └── config │ │ │ │ ├── config.sample.php │ │ │ │ └── config_mysql.php │ │ ├── OC90 │ │ │ └── config │ │ │ │ └── config_mysql.php │ │ ├── RC07 │ │ │ ├── .htaccess │ │ │ └── config │ │ │ │ ├── .htaccess │ │ │ │ ├── db.inc.php.dist │ │ │ │ ├── main.inc.php.dist │ │ │ │ └── mimetypes.php │ │ ├── RC08 │ │ │ ├── .htaccess │ │ │ └── config │ │ │ │ ├── .htaccess │ │ │ │ ├── db.inc.php.dist │ │ │ │ ├── main.inc.php.dist │ │ │ │ └── mimetypes.php │ │ ├── RC09 │ │ │ ├── .htaccess │ │ │ └── config │ │ │ │ ├── .htaccess │ │ │ │ ├── db.inc.php │ │ │ │ ├── db.inc.php.dist │ │ │ │ ├── main.inc.php │ │ │ │ ├── main.inc.php.dist │ │ │ │ └── mimetypes.php │ │ ├── RC10 │ │ │ ├── .htaccess │ │ │ └── config │ │ │ │ ├── config.inc.php │ │ │ │ ├── config.inc.php.sample │ │ │ │ ├── defaults.inc.php │ │ │ │ └── mimetypes.php │ │ ├── RC11 │ │ │ ├── .htaccess │ │ │ └── config │ │ │ │ ├── config.inc.php │ │ │ │ ├── config.inc.php.sample │ │ │ │ ├── defaults.inc.php │ │ │ │ └── mimetypes.php │ │ ├── mysql │ │ │ ├── OC60 │ │ │ │ └── create_db.sql │ │ │ ├── OC70 │ │ │ │ └── create_db.sql │ │ │ ├── OC80 │ │ │ │ └── create_db.sql │ │ │ ├── OC81 │ │ │ │ └── create_db.sql │ │ │ ├── OC82 │ │ │ │ └── create_db.sql │ │ │ ├── OC90 │ │ │ │ └── create_db.sql │ │ │ ├── OC_LATEST │ │ │ │ └── create_db.sql │ │ │ ├── RC09 │ │ │ │ └── create_db.sql │ │ │ ├── RC10 │ │ │ │ └── create_db.sql │ │ │ └── RC11 │ │ │ │ └── create_db.sql │ │ ├── nginx.conf │ │ ├── phpmyadmin.conf │ │ └── sqllite │ │ │ └── 4.0.8 │ │ │ ├── config.php │ │ │ └── owncloud.db │ │ ├── mockimap.jar │ │ ├── nginx_ssl.conf │ │ ├── oc_apps │ │ └── .gitignore │ │ ├── php.ini │ │ ├── prepareMySQL.sh │ │ ├── prepareNginx.sh │ │ └── setup_environment.sh └── resources │ └── log4j.properties └── test └── java └── de └── martinreinhardt └── owncloud └── webtest ├── OwnCloud.java ├── RoundCube.java ├── StorageCharts.java ├── pages ├── AdminSettingsPage.java ├── LoginPage.java ├── PortalPage.java ├── RoundCubePage.java ├── StorageChartsPage.java └── UserSettingsPage.java ├── steps ├── AdminSteps.java ├── LoggedInUserSteps.java ├── LoginEndUserSteps.java ├── PortalUserSteps.java ├── RoundCubeSteps.java └── StorageChartsSteps.java ├── tests ├── LoginIT.java ├── RoundCubeBasicIT.java ├── RoundCubeMailNegativeIT.java ├── RoundCubeMailPositiveIT.java ├── RoundCubeMockedMailIT.java ├── RoundCubeRefreshIT.java ├── RoundCubeSettingsIT.java └── StorageChartsBasicIT.java └── util ├── AbstractPage.java ├── AbstractSteps.java ├── AbstractUITest.java ├── EmailUserDetails.java └── MockedImapServer.java /.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | .DS_Store 3 | *.swp 4 | *~ 5 | .history 6 | .indexes 7 | .lock 8 | .log 9 | .refactorings 10 | .metadata 11 | __MACOSX 12 | 13 | .idea/workspace.xml 14 | .idea/deployment.xml 15 | 16 | 17 | **/bin/* 18 | **/build/* 19 | **/target/* 20 | target/* 21 | **/.buildpath 22 | **/.settings/* 23 | **/.classpath 24 | *.log 25 | webtest/logs/* 26 | webtest/.classpath 27 | .idea/* 28 | .settings/org.eclipse.core.resources.prefs 29 | roundcube/node/* 30 | roundcube/node_modules/* 31 | roundcube/bower_components/* 32 | revealjs/node/* 33 | revealjs/node_modules/* 34 | revealjs/bower_components/* 35 | storagecharts2/node/* 36 | storagecharts2/node_modules/* 37 | storagecharts2/bower_components/* 38 | src/main/docker/app/oc_apps/* 39 | 40 | roundcube/.project 41 | revealjs/.project 42 | roundcube/.project 43 | storagecharts2/.project 44 | webtest/.project 45 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | OwnCloudApps -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/owncloud.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/php.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/sqldialects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Owncloud 4 | 5 | 6 | 7 | 8 | 9 | com.aptana.editor.php.aptanaPhpBuilder 10 | 11 | 12 | 13 | 14 | com.aptana.ide.core.unifiedBuilder 15 | 16 | 17 | 18 | 19 | 20 | com.aptana.editor.php.phpNature 21 | com.aptana.projects.webnature 22 | 23 | 24 | 25 | 1379754024793 26 | 27 | 26 28 | 29 | org.eclipse.ui.ide.multiFilter 30 | 1.0-name-matches-false-false-travis_ci 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.settings/com.aptana.editor.php.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | phpVersion=php5.3 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - 5.4 4 | - 5.3 5 | 6 | # optionally specify a list of environments, for example to test different RDBMS 7 | env: 8 | - DB=mysql OC=5.0 9 | - DB=sqllite OC=5.0 10 | - DB=mysql OC=4.5 11 | - DB=sqllite OC=4.5 12 | 13 | before_install: 14 | - sudo apt-get update -qq 15 | - sudo apt-get install -qq apache2 16 | - sudo apt-get install php5 17 | - sudo apt-get install libapache2-mod-php5 18 | - sudo /etc/init.d/apache2 restart 19 | - sudo apt-get install dovecot-common dovecot-imapd dovecot-pop3d 20 | - sudo apt-get install git 21 | 22 | before_script: 23 | - ./bin/ci/prepare.sh 24 | script: 25 | - sh -c "if [ '$DB' = 'mysql' ]; then ./bin/ci/prepare_mysql.sh; fi" 26 | - sh -c "if [ '$DB' = 'sqllite' ]; then ./bin/ci/prepare_sqllite.sh; fi" 27 | # - phpunit --configuration phpunit_$DB_oc$OC.xml --coverage-text 28 | # - ./bin/sausage/vendor/bin/phpunit --path=./apps/roundcube/tests/integration/Selenium.php 29 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | First search if the problem is already known! 2 | 3 | If not create a new issue: 4 | 5 | * Tell about your environment: 6 | * server version 7 | * used browser 8 | * used own cloud version 9 | * used app version 10 | * Describe your issue 11 | * describe your steps leading to the issue 12 | * attach error logs or screenshots 13 | -------------------------------------------------------------------------------- /ldapprofile/README.md: -------------------------------------------------------------------------------- 1 | LDAP Profile Editor for owncloud 2 | ======== 3 | 4 | * Edit LDAP user profile including password change 5 | * update picture -------------------------------------------------------------------------------- /revealjs/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (grunt) { 4 | require('load-grunt-tasks')(grunt); 5 | require('time-grunt')(grunt); 6 | grunt.loadNpmTasks('grunt-bower-task'); 7 | 8 | grunt.initConfig({ 9 | bower: { 10 | install: { 11 | //just run 'grunt bower:install' and you'll see files from your Bower packages in lib directory 12 | 13 | options: { 14 | copy: false, 15 | } 16 | } 17 | }, 18 | yeoman: { 19 | // configurable paths 20 | app: require('./bower.json').appPath || 'src/main/webapp', 21 | dist: 'target' 22 | }, 23 | autoprefixer: { 24 | options: ['last 1 version'], 25 | dist: { 26 | files: [{ 27 | expand: true, 28 | cwd: '.tmp/styles/', 29 | src: '{,*/}*.css', 30 | dest: '.tmp/styles/' 31 | }] 32 | } 33 | }, 34 | connect: { 35 | options: { 36 | port: 9000, 37 | // Change this to '0.0.0.0' to access the server from outside. 38 | hostname: 'localhost', 39 | livereload: 35729 40 | }, 41 | livereload: { 42 | options: { 43 | open: true, 44 | base: [ 45 | '.tmp', 46 | '<%= yeoman.app %>', 47 | '.' 48 | ] 49 | } 50 | }, 51 | test: { 52 | options: { 53 | port: 9001, 54 | base: [ 55 | '.tmp', 56 | 'test', 57 | '<%= yeoman.app %>', 58 | 'bower_components' 59 | ] 60 | } 61 | }, 62 | dist: { 63 | options: { 64 | base: '<%= yeoman.dist %>' 65 | } 66 | } 67 | }, 68 | clean: { 69 | dist: { 70 | files: [{ 71 | dot: true, 72 | src: [ 73 | '.tmp', 74 | '<%= yeoman.dist %>/*', 75 | '!<%= yeoman.dist %>/.git*' 76 | ] 77 | }] 78 | }, 79 | server: '.tmp' 80 | }, 81 | jshint: { 82 | options: { 83 | jshintrc: '.jshintrc' 84 | }, 85 | all: [ 86 | 'Gruntfile.js', 87 | '<%= yeoman.app %>/scripts/{,*/}*.js' 88 | ] 89 | }, 90 | karma: { 91 | unit: { 92 | configFile: 'src/test/webapp/karma.conf.js', 93 | singleRun: true 94 | } 95 | }, 96 | }); 97 | 98 | grunt.registerTask('test', [ 99 | 'clean', 100 | 'autoprefixer', 101 | 'connect:test', 102 | 'karma' 103 | ]); 104 | 105 | grunt.registerTask('default', [ 106 | 'test' 107 | ]); 108 | }; 109 | -------------------------------------------------------------------------------- /revealjs/README.md: -------------------------------------------------------------------------------- 1 | RevealJS App for owncloud 2 | ======== 3 | 4 | * Viewer 5 | * Online-Editor 6 | -------------------------------------------------------------------------------- /revealjs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oc_revealjs", 3 | "version": "2.5.2", 4 | "repository": "git://github.com/hypery2k/owncloud", 5 | "devDependencies": { 6 | "jquery": "~2.1.1", 7 | "jquery-ui": "~1.11.1" 8 | }, 9 | "scripts": { 10 | "test": "grunt test" 11 | }, 12 | "homepage": "https://github.com/hypery2k/owncloud" 13 | } 14 | -------------------------------------------------------------------------------- /revealjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oc_revealjs", 3 | "version": "2.5.4", 4 | "dependencies": {}, 5 | "repository": "git://github.com/hypery2k/owncloud", 6 | "devDependencies": { 7 | "grunt": "~0.4.1", 8 | "grunt-autoprefixer": "~0.2.0", 9 | "grunt-bower-task": "^0.4.0", 10 | "grunt-cli": "~0.1.13", 11 | "grunt-concurrent": "~0.3.0", 12 | "grunt-contrib-clean": "~0.5.0", 13 | "grunt-contrib-connect": "~0.5.0", 14 | "grunt-contrib-copy": "~0.4.1", 15 | "grunt-contrib-imagemin": "~0.9.3", 16 | "grunt-contrib-jshint": "~0.6.0", 17 | "grunt-google-cdn": "~0.2.0", 18 | "grunt-karma": "~0.6.2", 19 | "karma": "~0.10.2", 20 | "karma-chrome-launcher": "~0.1.0", 21 | "karma-coffee-preprocessor": "~0.1.0", 22 | "karma-firefox-launcher": "~0.1.0", 23 | "karma-html2js-preprocessor": "~0.1.0", 24 | "karma-jasmine": "~0.1.3", 25 | "karma-junit-reporter": "^0.2.2", 26 | "karma-phantomjs-launcher": "~0.1.0", 27 | "karma-requirejs": "~0.2.0", 28 | "karma-script-launcher": "~0.1.0", 29 | "load-grunt-tasks": "~0.1.0", 30 | "time-grunt": "~0.1.0" 31 | }, 32 | "engines": { 33 | "node": ">=0.8.0" 34 | }, 35 | "scripts": { 36 | "test": "grunt test" 37 | }, 38 | "homepage": "https://github.com/hypery2k/owncloud" 39 | } 40 | -------------------------------------------------------------------------------- /revealjs/src/main/php/README.md: -------------------------------------------------------------------------------- 1 | Reveal.js Web Application for ownCloud 2 | 3 | This application can be used to run reveal presentations on your cloud. 4 | I may write a detailed documentation for this project as well. -------------------------------------------------------------------------------- /revealjs/src/main/php/appinfo/app.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | OCP\Util::addStyle('revealjs','style'); 25 | 26 | 27 | //TODO deprecated 28 | OCP\App::register(array('order' => 70, 'id' => 'revealjs', 'name' => 'RevealJS')); 29 | 30 | OCP\App::addNavigationEntry( array( 31 | 'id' => 'reveal_index', 32 | 'order' => 80, 33 | 'href' => OCP\Util::linkTo( 'revealjs', 'index.php' ), 34 | 'icon' => OCP\Util::imagePath( 'revealjs', 'presentation.svg' ), 35 | 'name' => 'RevealJS' 36 | )); 37 | -------------------------------------------------------------------------------- /revealjs/src/main/php/appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | revealjs 4 | RevealJS Application 5 | AGPL 6 | Raghu Nayyar and Frank Karlitschek and Martin Reinhardt 7 | 5.0 8 | ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} 9 | 10 | 11 | 12 | A reveal.js app for ownCloud 13 | 14 | 15 | 16 | https://github.com/hypery2k/owncloud/wiki/Installation#revealjs 17 | 18 | 19 | https://github.com/hypery2k/owncloud 20 | -------------------------------------------------------------------------------- /revealjs/src/main/php/appinfo/version: -------------------------------------------------------------------------------- 1 | ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} -------------------------------------------------------------------------------- /revealjs/src/main/php/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } 49 | 50 | 51 | /* HTML5BP: 52 | These selection declarations have to be separate. 53 | No text-shadow: twitter.com/miketaylr/status/12228805301 54 | Also: hot pink. */ 55 | ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; } 56 | ::selection { background:#FF5E99; color:#fff; text-shadow: none; } 57 | 58 | -------------------------------------------------------------------------------- /revealjs/src/main/php/css/style.css: -------------------------------------------------------------------------------- 1 | #emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; } 2 | 3 | .revealist { margin-top:40px; padding:5px; width:100%;} 4 | .revealist tr:hover { background-color:#ccc; } 5 | .revealist tr td { padding:5px; } 6 | 7 | .docu { position: absolute; right: 13.5em; top: 0em; } 8 | 9 | #documentation { margin: 20px; } 10 | #documentation h1 { font-size:1.8em; font-weight:bold; color:#888; } 11 | #documentation h2 { font-size:1.5em; font-weight:bold; color:#888; } 12 | #documentation h2 { font-size:1.2em; font-weight:bold; color:#888; } 13 | 14 | .examplecode { font-size:0.9em; font-family:"Courier New","Courier"; background-color:#eee; color:#333; width:90%; height:300px; padding:10px;} -------------------------------------------------------------------------------- /revealjs/src/main/php/documentation.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | require_once 'lib/reveal.php'; 25 | 26 | OCP\User::checkLoggedIn(); 27 | OCP\JSON::checkAppEnabled('revealjs'); 28 | OCP\App::setActiveNavigationEntry( 'revealjs_index' ); 29 | 30 | $tmpl = new OCP\Template('revealjs', 'documentation', 'user'); 31 | $tmpl->printPage(); -------------------------------------------------------------------------------- /revealjs/src/main/php/img/impress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/revealjs/src/main/php/img/impress.png -------------------------------------------------------------------------------- /revealjs/src/main/php/img/impressbig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/revealjs/src/main/php/img/impressbig.png -------------------------------------------------------------------------------- /revealjs/src/main/php/index.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | require_once 'lib/reveal.php'; 25 | 26 | OCP\User::checkLoggedIn(); 27 | OCP\App::checkAppEnabled('revealjs'); 28 | OCP\Util::addStyle( 'revealjs', 'style' ); 29 | OCP\App::setActiveNavigationEntry( 'revealjs_index' ); 30 | 31 | 32 | $list=\OCA_reveal\Storage::getPresentations(); 33 | 34 | $tmpl = new OCP\Template('revealjs', 'presentations', 'user'); 35 | $tmpl->assign('list', $list); 36 | $tmpl->printPage(); 37 | -------------------------------------------------------------------------------- /revealjs/src/main/php/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p. 21 | * 22 | */ 23 | 24 | require_once 'lib/reveal.php'; 25 | 26 | // Check if we are a user 27 | OCP\User::checkLoggedIn(); 28 | OCP\JSON::checkAppEnabled('revealjs'); 29 | 30 | $filename = OCP\Util::sanitizeHTML($_GET['file']); 31 | $title = OCP\Util::sanitizeHTML($_GET['name']); 32 | 33 | if(!OC_Filesystem::file_exists($filename)) { 34 | header("HTTP/1.0 404 Not Found"); 35 | $tmpl = new OCP\Template( '', '404', 'guest' ); 36 | $tmpl->assign('file', $filename); 37 | $tmpl->printPage(); 38 | exit; 39 | } 40 | 41 | $data=OC_Filesystem::file_get_contents( $filename ); 42 | 43 | 44 | if((stripos($data,'false) or (stripos($data,'false) or (stripos($data,'false)) { 45 | echo('
This is not a valid reveal file. Please check the documentation.
'); 46 | exit; 47 | } 48 | 49 | if(stripos($data,'false) { 50 | echo('
Please don\'t use javascript in reveal files.
'); 51 | exit; 52 | } 53 | 54 | 55 | header('Content-Type: text/html', true); 56 | OCP\Response::disableCaching(); 57 | 58 | @ob_end_clean(); 59 | 60 | \OCA_Reveal\Storage::showHeader($title); 61 | OC_Filesystem::readfile( $filename ); 62 | \OCA_Reveal\Storage::showFooter(); -------------------------------------------------------------------------------- /revealjs/src/main/php/templates/documentation.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

Reveal Presentation

5 |
6 | 7 | 8 |

What is Reveal?

9 |

10 | Reveal is an ownCloud application that uses reveal.js for easily creating beautiful presentations using HTML. 11 |

12 |

13 |

Cheers to Hakim El Hattab for creating such a wonderful application.

14 | 15 | 16 |
-------------------------------------------------------------------------------- /revealjs/src/main/php/templates/presentations.php: -------------------------------------------------------------------------------- 1 | 4 | '.$l->t('Documentation').' 5 | 6 | '); 7 | 8 | if(empty($_['list'])) { 9 | echo('
'.$l->t('No Reveal files are found in your ownCloud. Please upload a .reveal file.').'
'); 10 | } else { 11 | echo(''); 12 | foreach($_['list'] as $entry) { 13 | echo(''); 14 | } 15 | echo('
'.$entry['name'].''.\OCP\Util::formatDate($entry['mtime']).''.\OCP\Util::humanFileSize($entry['size']).'
'); 16 | } 17 | ?> 18 | -------------------------------------------------------------------------------- /revealjs/src/test/php/AppTest.php: -------------------------------------------------------------------------------- 1 | filename 5 | */ 6 | public static $CLASSPATH = array(); 7 | 8 | } 9 | 10 | class OC_L10N{ 11 | 12 | /** 13 | * @brief Translating 14 | * @param $text String The text we need a translation for 15 | * @param array $parameters default:array() Parameters for sprintf 16 | * @return \OC_L10N_String Translation or the same text 17 | * 18 | * Returns the translation. If no translation is found, $text will be 19 | * returned. 20 | */ 21 | public function t($text, $parameters = array()) { 22 | } 23 | } 24 | 25 | class OC_App{ 26 | /** 27 | * Get the directory for the given app. 28 | * If the app is defined in multiple directories, the first one is taken. (false if not found) 29 | */ 30 | public static function getAppPath($appid) { 31 | 32 | return $appid; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /revealjs/src/test/webapp/fixtures/player.html: -------------------------------------------------------------------------------- 1 |
2 |
-------------------------------------------------------------------------------- /revealjs/src/test/webapp/frontend/reveal.js: -------------------------------------------------------------------------------- 1 | beforeEach(function() { 2 | addFixture('player.html'); 3 | }); 4 | afterEach(function() { 5 | clearMyFixtures(); 6 | }); 7 | 8 | describe('revealjs', function() { 9 | it("init", function() { 10 | Reveal.initialize(); 11 | }); 12 | }); -------------------------------------------------------------------------------- /revealjs/src/test/webapp/karma.conf.ci.js: -------------------------------------------------------------------------------- 1 | var baseConfig = require('./karma.conf.js'); 2 | 3 | module.exports = function(config){ 4 | // Load base config 5 | baseConfig(config); 6 | 7 | // Override base config 8 | config.set({ 9 | // web server port 10 | port: 10080, 11 | singleRun: true, 12 | autoWatch: false 13 | }); 14 | }; -------------------------------------------------------------------------------- /revealjs/src/test/webapp/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | 3 | module.exports = function(config) { 4 | config.set({ 5 | // base path, that will be used to resolve files and exclude 6 | basePath : '', 7 | 8 | // testing framework to use (jasmine/mocha/qunit/...) 9 | frameworks : [ 'jasmine' ], 10 | 11 | // list of files / patterns to load in the browser 12 | files : [ 13 | '../../../bower_components/jquery/dist/jquery.js', 14 | '../../../bower_components/jquery-ui/jquery-ui.js', 15 | 'fixtures/*.html', 16 | 'mocks/*.js', 17 | '../../main/php/js/*.js', 18 | 'utils.js', 19 | 'frontend/*.js' 20 | ], 21 | // list of files / patterns to exclude 22 | exclude : [ 'src/test/webapp/karma.conf*.js' ], 23 | 24 | preprocessors: { 25 | 'fixtures/*.html': ['html2js'] 26 | }, 27 | 28 | 29 | // web server port 30 | port : 9080, 31 | 32 | // level of logging 33 | // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG 34 | logLevel : config.LOG_INFO, 35 | 36 | // enable / disable watching file and executing tests whenever any file changes 37 | autoWatch : true, 38 | 39 | // Start these browsers, currently available: 40 | // - Chrome 41 | // - ChromeCanary 42 | // - Firefox 43 | // - Opera 44 | // - Safari (only Mac) 45 | // - PhantomJS 46 | // - IE (only Windows) 47 | browsers : [ 'PhantomJS' ], 48 | 49 | reporters : [ 'progress', 'junit' ], 50 | 51 | // the default configuration 52 | junitReporter : { 53 | outputFile : '../../../target/karma-test-results.xml', 54 | suite : 'revealjs - javascript unittests' 55 | }, 56 | // Continuous Integration mode 57 | // if true, it capture browsers, run tests and exit 58 | singleRun : false, 59 | 60 | }); 61 | }; 62 | -------------------------------------------------------------------------------- /revealjs/src/test/webapp/mocks/oc.js: -------------------------------------------------------------------------------- 1 | var OC={}; 2 | OC.generateUrl = function(str){return str}; 3 | -------------------------------------------------------------------------------- /revealjs/src/test/webapp/utils.js: -------------------------------------------------------------------------------- 1 | function addFixture(html) { 2 | document.body.innerHTML = __html__['fixtures/' + html]; 3 | } 4 | 5 | function clearMyFixtures() { 6 | document.body.innerHTML = ''; 7 | } -------------------------------------------------------------------------------- /roundcube/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /roundcube/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (grunt) { 4 | require('load-grunt-tasks')(grunt); 5 | require('time-grunt')(grunt); 6 | grunt.loadNpmTasks('grunt-bower-task'); 7 | 8 | grunt.initConfig({ 9 | bower: { 10 | install: { 11 | //just run 'grunt bower:install' and you'll see files from your Bower packages in lib directory 12 | 13 | options: { 14 | copy: false, 15 | } 16 | } 17 | }, 18 | yeoman: { 19 | // configurable paths 20 | app: require('./bower.json').appPath || 'src/main/webapp', 21 | dist: 'target' 22 | }, 23 | autoprefixer: { 24 | options: ['last 1 version'], 25 | dist: { 26 | files: [{ 27 | expand: true, 28 | cwd: '.tmp/styles/', 29 | src: '{,*/}*.css', 30 | dest: '.tmp/styles/' 31 | }] 32 | } 33 | }, 34 | connect: { 35 | options: { 36 | port: 9000, 37 | // Change this to '0.0.0.0' to access the server from outside. 38 | hostname: 'localhost', 39 | livereload: 35729 40 | }, 41 | livereload: { 42 | options: { 43 | open: true, 44 | base: [ 45 | '.tmp', 46 | '<%= yeoman.app %>', 47 | '.' 48 | ] 49 | } 50 | }, 51 | test: { 52 | options: { 53 | port: 9001, 54 | base: [ 55 | '.tmp', 56 | 'test', 57 | '<%= yeoman.app %>', 58 | 'bower_components' 59 | ] 60 | } 61 | }, 62 | dist: { 63 | options: { 64 | base: '<%= yeoman.dist %>' 65 | } 66 | } 67 | }, 68 | clean: { 69 | dist: { 70 | files: [{ 71 | dot: true, 72 | src: [ 73 | '.tmp', 74 | '<%= yeoman.dist %>/*', 75 | '!<%= yeoman.dist %>/.git*' 76 | ] 77 | }] 78 | }, 79 | server: '.tmp' 80 | }, 81 | jshint: { 82 | options: { 83 | jshintrc: '.jshintrc' 84 | }, 85 | all: [ 86 | 'Gruntfile.js', 87 | '<%= yeoman.app %>/scripts/{,*/}*.js' 88 | ] 89 | }, 90 | karma: { 91 | unit: { 92 | configFile: 'src/test/webapp/karma.conf.js', 93 | singleRun: true 94 | } 95 | }, 96 | }); 97 | 98 | grunt.registerTask('test', [ 99 | 'clean', 100 | 'autoprefixer', 101 | 'connect:test', 102 | 'karma' 103 | ]); 104 | 105 | grunt.registerTask('default', [ 106 | 'test' 107 | ]); 108 | }; 109 | -------------------------------------------------------------------------------- /roundcube/README.md: -------------------------------------------------------------------------------- 1 | Roundcube App for owncloud 2 | ======== 3 | 4 | Embedd roundcube interface in owncloud 5 | 6 | ## Requirements: 7 | * OwnCloud 5.0+ (tested with 5.0 - 7.0.0) for 6.X and 7.x 8 | * Bookmarks apps enabled previously 9 | * Mailserver with IMAP-Support (prefer in same webserver/host) 10 | * Roundcube Webmailclient (tested with roundcubemail-0.7,0.8,0.9 and 1.0, prefer in same webserver/host) 11 | * Set the xframe_restriction to false due some issues usage of frames for mail rendering 12 | * curl installed for newer 2.5.6 version of plugin, fopen active for olders releases 13 | 14 | Complete documentation on https://github.com/hypery2k/owncloud/wiki/Roundcube-OC-Installation-and-usage 15 | -------------------------------------------------------------------------------- /roundcube/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oc_roundcube", 3 | "version": "2.5.2", 4 | "repository": "git://github.com/hypery2k/owncloud", 5 | "devDependencies": { 6 | "jquery": "~2.1.1", 7 | "jquery-ui": "~1.11.1" 8 | }, 9 | "scripts": { 10 | "test": "grunt test" 11 | }, 12 | "homepage": "https://github.com/hypery2k/owncloud" 13 | } 14 | -------------------------------------------------------------------------------- /roundcube/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oc_roundcube", 3 | "version": "2.5.4", 4 | "dependencies": {}, 5 | "repository": "git://github.com/hypery2k/owncloud", 6 | "devDependencies": { 7 | "grunt": "~0.4.1", 8 | "grunt-autoprefixer": "~0.2.0", 9 | "grunt-bower-task": "^0.4.0", 10 | "grunt-cli": "~0.1.13", 11 | "grunt-concurrent": "~0.3.0", 12 | "grunt-contrib-clean": "~0.5.0", 13 | "grunt-contrib-connect": "~0.5.0", 14 | "grunt-contrib-copy": "~0.4.1", 15 | "grunt-contrib-imagemin": "~0.9.3", 16 | "grunt-contrib-jshint": "~0.6.0", 17 | "grunt-google-cdn": "~0.2.0", 18 | "grunt-karma": "~0.6.2", 19 | "karma": "~0.10.2", 20 | "karma-chrome-launcher": "~0.1.0", 21 | "karma-coffee-preprocessor": "~0.1.0", 22 | "karma-firefox-launcher": "~0.1.0", 23 | "karma-html2js-preprocessor": "~0.1.0", 24 | "karma-jasmine": "~0.1.3", 25 | "karma-junit-reporter": "^0.2.2", 26 | "karma-phantomjs-launcher": "~0.1.0", 27 | "karma-requirejs": "~0.2.0", 28 | "karma-script-launcher": "~0.1.0", 29 | "load-grunt-tasks": "~0.1.0", 30 | "time-grunt": "~0.1.0" 31 | }, 32 | "engines": { 33 | "node": ">=0.8.0" 34 | }, 35 | "scripts": { 36 | "test": "grunt test" 37 | }, 38 | "homepage": "https://github.com/hypery2k/owncloud" 39 | } 40 | -------------------------------------------------------------------------------- /roundcube/src/main/php/adminSettings.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | // ensure that only admin user access this page 25 | OCP\User::checkAdminUser(); 26 | 27 | OCP\Util::addStyle('roundcube', 'adminSettings'); 28 | 29 | // fill template 30 | $params = array('maildir', 'removeHeaderNav', 'removeControlNav', 'autoLogin', 'noSSLverify','enableDebug', 'rcHost', 'rcPort', 'rcInternalAddress', 'rcRefreshInterval'); 31 | 32 | 33 | // workaround to detect OC version 34 | $ocVersion = OCP\Util::getVersion(); 35 | // below OC7 36 | if ($ocVersion[0] < 7) { 37 | OCP\Util::addScript('roundcube', 'adminSettings.oc6'); 38 | $tmpl = new OCP\Template('roundcube', 'tpl.adminSettings.oc6'); 39 | } else { 40 | // OC7.x 41 | if ($ocVersion[0] < 8) { 42 | OCP\Util::addScript('roundcube', 'adminSettings.oc7'); 43 | $tmpl = new OCP\Template('roundcube', 'tpl.adminSettings.oc7'); 44 | } else { 45 | OCP\Util::addScript('roundcube', 'adminSettings'); 46 | $tmpl = new OCP\Template('roundcube', 'tpl.adminSettings'); 47 | } 48 | } 49 | 50 | 51 | foreach ($params as $param) { 52 | $value = OCP\Config::getAppValue('roundcube', $param, ''); 53 | $tmpl -> assign($param, $value); 54 | } 55 | 56 | // workaround to detect OC version 57 | $tmpl->assign('ocVersion', $ocVersion); 58 | 59 | return $tmpl -> fetchPage(); 60 | -------------------------------------------------------------------------------- /roundcube/src/main/php/ajax/userSettings.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | *dbname* 4 | true 5 | false 6 | utf8 7 | 8 | *dbprefix*roundcube 9 | 10 | 11 | id 12 | integer 13 | 1 14 | 0 15 | true 16 | 5 17 | 18 | 19 | oc_user 20 | text 21 | 22 | true 23 | 4096 24 | 25 | 26 | mail_user 27 | text 28 | 29 | true 30 | 4096 31 | 32 | 33 | mail_password 34 | text 35 | 36 | true 37 | 4096 38 | 39 | 40 | 41 |
42 |
43 | -------------------------------------------------------------------------------- /roundcube/src/main/php/appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | roundcube 4 | RoundCube Mail 5 | AGPL 6 | Martin Reinhardt 7 | 5.0 8 | ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} 9 | 10 | 11 | Integrates existing roundcube into OwnCloud, check the instructions below. 12 | The app needs the bookmarks 13 | application to be enabled. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | https://github.com/hypery2k/owncloud/wiki/Installation#roundcube 22 | 23 | 24 | https://github.com/hypery2k/owncloud 25 | 26 | -------------------------------------------------------------------------------- /roundcube/src/main/php/appinfo/routes.php: -------------------------------------------------------------------------------- 1 | create('roundcube_index', '/')->action( 6 | function($params){ 7 | require OC_App::getAppPath('roundcube').'/index.php'; 8 | } 9 | ); 10 | $this->create('roundcube_refresh', '/refresh')->post()->action('OC_RoundCube_AuthHelper', 'refresh'); 11 | 12 | $this->create('roundcube_ajax_userSettings', 'ajax/userSettings.php')->actionInclude(OC_App::getAppPath('roundcube').'/ajax/userSettings.php'); 13 | $this->create('roundcube_ajax_adminSettings', 'ajax/adminSettings.php')->actionInclude(OC_App::getAppPath('roundcube').'/ajax/adminSettings.php'); 14 | -------------------------------------------------------------------------------- /roundcube/src/main/php/appinfo/update.php: -------------------------------------------------------------------------------- 1 | execute($args); 11 | } catch (Exception $e) { 12 | // We got an exception 13 | OCP\Util::writeLog('roundcube', 'update.php: ' . 'update error for fixing SSL keys ' . $e, OCP\Util::DEBUG); 14 | } 15 | try { 16 | $sql = 'DELETE FROM `*PREFIX*appconfig` WHERE appid = roundcube AND configkey = rcNoCronRefresh'; 17 | $args = array(1); 18 | $query = \OCP\DB::prepare($sql); 19 | $result = $query->execute($args); 20 | } catch (Exception $e) { 21 | // We got an exception == table not found 22 | OCP\Util::writeLog('roundcube', 'update.php: ' . 'update error for removing rcNoCronRefresh. ' . $e, OCP\Util::DEBUG); 23 | } 24 | try { 25 | $sql = 'DELETE FROM `*PREFIX*appconfig` WHERE appid = roundcube AND configkey = encryptstring1'; 26 | $args = array(1); 27 | $query = \OCP\DB::prepare($sql); 28 | $result = $query->execute($args); 29 | } catch (Exception $e) { 30 | // We got an exception == table not found 31 | OCP\Util::writeLog('roundcube', 'update.php: ' . 'update error for removing encryptstring1. ' . $e, OCP\Util::DEBUG); 32 | } 33 | try { 34 | $sql = 'DELETE FROM `*PREFIX*appconfig` WHERE appid = roundcube AND configkey = encryptstring1'; 35 | $args = array(1); 36 | $query = \OCP\DB::prepare($sql); 37 | $result = $query->execute($args); 38 | } catch (Exception $e) { 39 | // We got an exception == table not found 40 | OCP\Util::writeLog('roundcube', 'update.php: ' . 'update error for removing encryptstring1. ' . $e, OCP\Util::DEBUG); 41 | } 42 | try { 43 | $sql = 'DELETE FROM `*PREFIX*appconfig` WHERE appid = roundcube AND configkey = mail_username'; 44 | $args = array(1); 45 | $query = \OCP\DB::prepare($sql); 46 | $result = $query->execute($args); 47 | } catch (Exception $e) { 48 | // We got an exception == table not found 49 | OCP\Util::writeLog('roundcube', 'update.php: ' . 'update error for removing mail_username. ' . $e, OCP\Util::DEBUG); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /roundcube/src/main/php/appinfo/version: -------------------------------------------------------------------------------- 1 | ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} -------------------------------------------------------------------------------- /roundcube/src/main/php/css/adminSettings.css: -------------------------------------------------------------------------------- 1 | .statusmessage { 2 | background-color: #DDDDFF; 3 | } 4 | .errormessage { 5 | background-color: #FFDDDD; 6 | } 7 | .successmessage { 8 | background-color: #DDFFDD; 9 | } 10 | .statusmessage,.errormessage,.successmessage{ 11 | display:none; 12 | padding: 1; 13 | } 14 | -------------------------------------------------------------------------------- /roundcube/src/main/php/css/base.css: -------------------------------------------------------------------------------- 1 | #roundcube_container { 2 | position: fixed; 3 | } 4 | #roundcubeFrame { 5 | height: 100%; 6 | } 7 | #roundcubeLoaderContainer { 8 | position: fixed; 9 | top: 0; 10 | left: 0; 11 | width: 100%; 12 | height: 100%; 13 | background-color: #FFF; 14 | } 15 | #roundcubeLoader { 16 | position: fixed; 17 | top: 50%; 18 | left: 50%; 19 | width: 128px; 20 | height: 14px; 21 | margin-top: -7px; /* Half the height */ 22 | margin-left: -64px; /* Half the width */ 23 | } 24 | 25 | .mail-controls { 26 | -moz-box-sizing: border-box; 27 | -webkit-box-sizing: border-box; 28 | box-sizing: border-box; 29 | position: fixed; 30 | right: 0; 31 | left: 0; 32 | height: 26px; 33 | width: 100%; 34 | padding: 0; 35 | margin: 0; 36 | background: #eee; 37 | border-bottom: 1px solid #e7e7e7; 38 | } 39 | 40 | 41 | #firstrun { 42 | position:relative; 43 | top:25%; 44 | left:20%; 45 | right:20%; 46 | width:50%; 47 | font-weight:bold; 48 | text-align:center; 49 | color:#777 50 | } 51 | #firstrun h1 { 52 | font-size:1.5em; 53 | text-align:center; 54 | margin-bottom:1em 55 | } 56 | #firstrun small { 57 | font-size:1.2em; 58 | } -------------------------------------------------------------------------------- /roundcube/src/main/php/css/userSettings.css: -------------------------------------------------------------------------------- 1 | /* Show password toggle */ 2 | #rc_mail_password_show { 3 | display:none; 4 | } 5 | #rc_mail_password_show:checked + label { 6 | ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; 7 | filter:alpha(opacity=80); 8 | opacity:.8; 9 | } 10 | #rc_mail_password_show + label { 11 | text-indent: 100% !important; 12 | overflow:hidden !important; 13 | position:absolute!important; 14 | height:14px; 15 | width:24px; 16 | background-image:url("../../../core/img/actions/toggle.png"); 17 | background-repeat:no-repeat; 18 | ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 19 | filter:alpha(opacity=30); 20 | opacity:.3; 21 | } 22 | #rc_mail_password, input[name="mail_password-clone"] { 23 | padding:0.6em 2.5em 0.4em 0.4em; 24 | width:8em; 25 | } 26 | #rc_mail_password_show + label { 27 | margin-top:1em; margin-left:-3em; 28 | } 29 | .successmessage { 30 | background-color: #DDFFDD; 31 | } 32 | .errormessage { 33 | background-color: #FFDDDD; 34 | } 35 | .statusmessage { 36 | background-color: #DDDDFF; 37 | } 38 | .successmessage,.errormessage,.statusmessage{ 39 | display:none; 40 | } 41 | -------------------------------------------------------------------------------- /roundcube/src/main/php/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/roundcube/src/main/php/img/loader.gif -------------------------------------------------------------------------------- /roundcube/src/main/php/img/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/roundcube/src/main/php/img/mail.png -------------------------------------------------------------------------------- /roundcube/src/main/php/index.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | // Check if we are a user 25 | OCP\User::checkLoggedIn(); 26 | OCP\App::checkAppEnabled('roundcube'); 27 | 28 | 29 | // Check if we are a user 30 | if (!OCP\User::isLoggedIn()) { 31 | header("Location: " . OCP\Util::linkTo('', 'index.php')); 32 | exit(); 33 | } 34 | 35 | // Load our style 36 | OCP\Util::addStyle('roundcube', 'base'); 37 | 38 | // workaround to detect OC version 39 | $ocVersion = @reset(OCP\Util::getVersion()); 40 | 41 | // OC 5 42 | if ($ocVersion < 6) { 43 | OCP\Util::writeLog('roundcube', 'Running on OwnCloud 5', OCP\Util::DEBUG); 44 | // add neede JS 45 | OCP\Util::addScript('', 'jquery-1.7.2.min'); 46 | OCP\Util::addScript('roundcube', 'jquery.plugins'); 47 | // OC 6 or greater 48 | } else { 49 | OCP\Util::writeLog('roundcube', 'Running on OwnCloud '.$ocVersion, OCP\Util::DEBUG); 50 | } 51 | OCP\Util::addScript('roundcube', 'mail'); 52 | 53 | // add new navigation entry 54 | OCP\App::setActiveNavigationEntry("roundcube_index"); 55 | 56 | $tmpl = new OCP\Template("roundcube", "tpl.mail", "user"); 57 | 58 | $tmpl -> printpage(); 59 | -------------------------------------------------------------------------------- /roundcube/src/main/php/js/adminSettings.js: -------------------------------------------------------------------------------- 1 | // declare namespace 2 | var Roundcube = Roundcube || {}; 3 | 4 | /** 5 | * init admin settings view 6 | */ 7 | Roundcube.adminSettingsUI = function() { 8 | 9 | if ($('#roundcube').length > 0) { 10 | 11 | $('#rcAdminSubmit').click(function(event) { 12 | event.preventDefault(); 13 | 14 | var self = $(this); 15 | var post = $('#rcMailAdminPrefs').serialize(); 16 | $('#adminmail_update_message').show(); 17 | $('#adminmail_success_message').hide(); 18 | $('#adminmail_error_message').hide(); 19 | // Ajax foobar 20 | $.post(OC.filePath('roundcube', 'ajax', 'adminSettings.php'), post, function(data) { 21 | $('#adminmail_update_message').hide(); 22 | if (data.status == 'success') { 23 | $('#adminmail_success_message').html(data.data.message); 24 | $('#adminmail_success_message').show(); 25 | window.setTimeout(function() { 26 | $('#adminmail_success_message').hide(); 27 | }, 1000); 28 | } else { 29 | $('#adminmail_error_message').html(data.data.message); 30 | $('#adminmail_error_message').show(); 31 | } 32 | }, 'json'); 33 | return false; 34 | }); 35 | } 36 | } 37 | 38 | $(document).ready(function() { 39 | if ($('#roundcube')) { 40 | Roundcube.adminSettingsUI(); 41 | } 42 | }); 43 | -------------------------------------------------------------------------------- /roundcube/src/main/php/js/adminSettings.oc6.js: -------------------------------------------------------------------------------- 1 | // declare namespace 2 | var Roundcube = Roundcube || {}; 3 | 4 | /** 5 | * init admin settings view 6 | */ 7 | Roundcube.adminSettingsUI = function() { 8 | 9 | if ($('#roundcube').length > 0) { 10 | // enable tabs on settings page 11 | $('#roundcube').tabs(); 12 | 13 | $('#rcAdminSubmit').click(function(event) { 14 | event.preventDefault(); 15 | 16 | var self = $(this); 17 | var post = $('#rcMailAdminPrefs').serialize(); 18 | $('#adminmail_update_message').show(); 19 | $('#adminmail_success_message').hide(); 20 | $('#adminmail_error_message').hide(); 21 | // Ajax foobar 22 | $.post(OC.filePath('roundcube', 'ajax', 'adminSettings.php'), post, function(data) { 23 | $('#adminmail_update_message').hide(); 24 | if (data.status == 'success') { 25 | $('#adminmail_success_message').html(data.data.message); 26 | $('#adminmail_success_message').show(); 27 | window.setTimeout(function() { 28 | $('#adminmail_success_message').hide(); 29 | }, 10000); 30 | } else { 31 | $('#adminmail_error_message').html(data.data.message); 32 | $('#adminmail_error_message').show(); 33 | } 34 | }, 'json'); 35 | return false; 36 | }); 37 | } 38 | } 39 | 40 | $(document).ready(function() { 41 | if ($('#roundcube')) { 42 | Roundcube.adminSettingsUI(); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /roundcube/src/main/php/js/adminSettings.oc7.js: -------------------------------------------------------------------------------- 1 | // declare namespace 2 | var Roundcube = Roundcube || {}; 3 | 4 | /** 5 | * init admin settings view 6 | */ 7 | Roundcube.adminSettingsUI = function() { 8 | 9 | if ($('#roundcube').length > 0) { 10 | // enable tabs on settings page 11 | $('#roundcube').tabs(); 12 | 13 | $('#rcAdminSubmit').click(function(event) { 14 | event.preventDefault(); 15 | 16 | var self = $(this); 17 | var post = $('#rcMailAdminPrefs').serialize(); 18 | $('#adminmail_update_message').show(); 19 | $('#adminmail_success_message').hide(); 20 | $('#adminmail_error_message').hide(); 21 | // Ajax foobar 22 | $.post(OC.filePath('roundcube', 'ajax', 'adminSettings.php'), post, function(data) { 23 | $('#adminmail_update_message').hide(); 24 | if (data.status == 'success') { 25 | $('#adminmail_success_message').html(data.data.message); 26 | $('#adminmail_success_message').show(); 27 | window.setTimeout(function() { 28 | $('#adminmail_success_message').hide(); 29 | }, 10000); 30 | } else { 31 | $('#adminmail_error_message').html(data.data.message); 32 | $('#adminmail_error_message').show(); 33 | } 34 | }, 'json'); 35 | return false; 36 | }); 37 | } 38 | } 39 | 40 | $(document).ready(function() { 41 | if ($('#roundcube')) { 42 | Roundcube.adminSettingsUI(); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /roundcube/src/main/php/js/jquery.plugins.js: -------------------------------------------------------------------------------- 1 | // roundcube javascript namespace 2 | var rc = document.rc || {}; 3 | rc.logdebug = false; // always as false committed, otherwise errors in internet explorer 4 | // dirty fix for JS errors 5 | monthNames = undefined; 6 | $.fn.extend({ 7 | showPassword : function(c) { 8 | 9 | return this.each(function() { 10 | $checkbox = $($input.data('typetoggle')); 11 | 12 | $input.bind('keyup', function() { 13 | update($input, $clone) 14 | }); 15 | }); 16 | } 17 | }); 18 | $.fn.extend({ 19 | inFieldLabels : function(d) { 20 | } 21 | }); 22 | $.fn.extend({ 23 | tipsy : function(e) { 24 | } 25 | }); 26 | $.fn.extend({ 27 | avatar : function(f) { 28 | } 29 | }); -------------------------------------------------------------------------------- /roundcube/src/main/php/js/routes.js: -------------------------------------------------------------------------------- 1 | // declare namespace 2 | 3 | var Roundcube = Roundcube || {}; 4 | 5 | /** 6 | * Set client side refresh job 7 | */ 8 | Roundcube.routes = function() { 9 | if (OC.currentUser) { 10 | if (Roundcube.refreshInterval) { 11 | if (OC.Router) { 12 | OC.Router.registerLoadedCallback(function() { 13 | var url = OC.Router.generate('roundcube_refresh'); 14 | Roundcube.refresh = setInterval(function() { 15 | $.post(url); 16 | }, Roundcube.refreshInterval * 1000); 17 | return true; 18 | }); 19 | // starting with OC7 OC.Router was removed 20 | } else { 21 | var url = OC.generateUrl('apps/roundcube/' + 'refresh'); 22 | Roundcube.refresh = setInterval(function() { 23 | if (OC.currentUser) { 24 | $.post(url); 25 | } else { 26 | // if user is null end up refresh (logged out) 27 | clearTimeout(Roundcube.refresh); 28 | } 29 | }, Roundcube.refreshInterval * 1000); 30 | return true; 31 | } 32 | } 33 | } else { 34 | // if user is null end up refresh (logged out) 35 | clearTimeout(Roundcube.refresh); 36 | return false; 37 | } 38 | } 39 | 40 | $(document).ready(function() { 41 | Roundcube.routes(); 42 | }); 43 | -------------------------------------------------------------------------------- /roundcube/src/main/php/js/settings.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | if ($('#roundcube').length > 0) { 4 | // enable tabs on settings page 5 | $('#roundcube').tabs(); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /roundcube/src/main/php/js/userSettings.js: -------------------------------------------------------------------------------- 1 | // declare namespace 2 | var Roundcube = Roundcube || {}; 3 | 4 | /** 5 | * init admin settings view 6 | */ 7 | Roundcube.userSettingsUI = function() { 8 | // Pseudo submit. In General, we do not like submitting forms in 9 | // favor of the Ajax technology. Its just more handy and less 10 | // error-prone. 11 | 12 | $("#rc_usermail_update").click(function(event) { 13 | event.preventDefault(); 14 | 15 | var self = $(this); 16 | var password = $('#rc_mail_password').val(); 17 | var user = $('#rc_mail_username').val(); 18 | 19 | $('#rc_usermail_success_message').hide(); 20 | $('#rc_usermail_error_message').hide(); 21 | $('#rc_usermail_error_empty_message').hide(); 22 | if (password != '' && user != '') { 23 | $('#rc_usermail_update_message').show(); 24 | // Serialize the data 25 | var post = $("form#roundcube").serialize(); 26 | // Ajax foo 27 | $.post(OC.filePath('roundcube', 'ajax', 'userSettings.php'), post, function(data) { 28 | if (data.status == 'success') { 29 | $('#rc_usermail_update_message').hide(); 30 | $('#rc_usermail_success_message').html(data.data.message); 31 | $('#rc_usermail_success_message').show(); 32 | window.setTimeout(function() { 33 | $('#rc_usermail_success_message').hide(); 34 | }, 1000); 35 | } else { 36 | console.error("Couldn't update roundcube settings."); 37 | $('#rc_usermail_update_message').hide(); 38 | $('#rc_usermail_error_message').html(data.data.message); 39 | $('#rc_usermail_error_message').show(); 40 | } 41 | }, 'json'); 42 | } else { 43 | $('#rc_usermail_update_message').hide(); 44 | console.error("Couldn't update roundcube settings due to empty"); 45 | $('#rc_usermail_error_empty_message').show(); 46 | } 47 | }); 48 | } 49 | 50 | $(document).ready(function() { 51 | Roundcube.userSettingsUI(); 52 | }); -------------------------------------------------------------------------------- /roundcube/src/main/php/l10n/.tx/config: -------------------------------------------------------------------------------- 1 | [owncloud.roundcube] 2 | file_filter = /roundcube.po 3 | source_file = templates/roundcube.pot 4 | source_lang = en 5 | type = PO -------------------------------------------------------------------------------- /roundcube/src/main/php/l10n/de/de.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/roundcube/src/main/php/l10n/de/de.js -------------------------------------------------------------------------------- /roundcube/src/main/php/l10n/de/roundcube.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/roundcube/src/main/php/l10n/de/roundcube.mo -------------------------------------------------------------------------------- /roundcube/src/main/php/l10n/fr/roundcube.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/roundcube/src/main/php/l10n/fr/roundcube.mo -------------------------------------------------------------------------------- /roundcube/src/main/php/l10n/ignorelist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/roundcube/src/main/php/l10n/ignorelist -------------------------------------------------------------------------------- /roundcube/src/main/php/l10n/xgettextfiles: -------------------------------------------------------------------------------- 1 | ../appinfo/app.php 2 | ../templates/adminSettings.php 3 | ../templates/mail.php 4 | ../templates/userSettings.php 5 | ../templates/part.error.db.php 6 | ../templates/part.error.error-settings.php 7 | ../templates/part.error.no-settings.php 8 | ../templates/part.error.wrong-auth.php 9 | ../js/scripts.js 10 | -------------------------------------------------------------------------------- /roundcube/src/main/php/lib/MailLoginException.class.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | /** 25 | * This Mail login exception will be thrown if the two 26 | * login attempts fail. 27 | */ 28 | class OC_Mail_LoginException extends Exception { 29 | } 30 | -------------------------------------------------------------------------------- /roundcube/src/main/php/lib/MailNetworkingException.class.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | /** 25 | * This Mail network exception will be thrown if an network error occurred. 26 | */ 27 | class OC_Mail_NetworkingException extends Exception { 28 | } 29 | -------------------------------------------------------------------------------- /roundcube/src/main/php/lib/MailRoundCubeNotFoundException.class.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | /** 25 | * This Mail login exception will be thrown if the two 26 | * login attempts fail. 27 | */ 28 | class OC_Mail_RC_InstallNotFoundException extends Exception { 29 | } 30 | -------------------------------------------------------------------------------- /roundcube/src/main/php/lib/RoundCubeDBUtil.class.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | class OC_RoundCube_DB_Util { 25 | 26 | /** 27 | * Check if roundcube table exists in the current database. 28 | * 29 | * @return bool TRUE if table exists, FALSE if no table found. 30 | */ 31 | public static function tableExists() { 32 | OCP\Util::writeLog('roundcube', 'OC_RoundCube_DB_Util.class.php: Checking if roundcube table exists.', OCP\Util::DEBUG); 33 | // Try a select statement against the table 34 | // Run it in try/catch in case PDO is in ERRMODE_EXCEPTION. 35 | try { 36 | $sql = 'SELECT * FROM `*PREFIX*roundcube` LIMIT 1'; 37 | OCP\Util::writeLog('roundcube', 'OC_RoundCube_DB_Util.class.php: Used SQL: ' . $sql, OCP\Util::DEBUG); 38 | $query = \OCP\DB::prepare($sql); 39 | $result = $query -> execute(); 40 | 41 | } catch (Exception $e) { 42 | // We got an exception == table not found 43 | OCP\Util::writeLog('roundcube', 'OC_RoundCube_DB_Util.class.php: Table roundcube does not exists. ' . $e, OCP\Util::DEBUG); 44 | return false; 45 | } 46 | OCP\Util::writeLog('roundcube', 'OC_RoundCube_DB_Util.class.php: Table roundcube exists.', OCP\Util::DEBUG); 47 | return true; 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /roundcube/src/main/php/templates/part.error.autologin.php: -------------------------------------------------------------------------------- 1 |
2 |

t("Auto-Login is not working. Please contact you're administrator") ?>

3 |
-------------------------------------------------------------------------------- /roundcube/src/main/php/templates/part.error.db.php: -------------------------------------------------------------------------------- 1 |
2 |

3 | t("Database error") ?> 4 |

5 |
6 | t('Please follow the wiki page to setup the database manually:') ?> 7 |

8 | Wiki 10 |
11 |
12 | -------------------------------------------------------------------------------- /roundcube/src/main/php/templates/part.error.error-settings.php: -------------------------------------------------------------------------------- 1 |
2 |

3 | t("You have errors in your settings") ?> 4 |

5 |
6 | t('You can manage your admin settings here:') ?> 7 |

8 | t('Settings'); ?> 10 | 11 |
12 |
13 | -------------------------------------------------------------------------------- /roundcube/src/main/php/templates/part.error.no-settings.php: -------------------------------------------------------------------------------- 1 |
2 |

3 | t("You don't have any email account configured yet.") ?> 4 |

5 |
6 | t('You can manage your email accounts here:') ?> 7 |

8 | t('Settings'); ?> 10 | 11 |
12 |
13 | -------------------------------------------------------------------------------- /roundcube/src/main/php/templates/part.error.wrong-auth.php: -------------------------------------------------------------------------------- 1 |
2 |

t("You don't have any email account configured correctly yet. Please check you username and password.") ?>

3 |
4 | t('You can manage your email accounts here:') ?> 5 | t('Settings'); ?> 6 |
7 |
-------------------------------------------------------------------------------- /roundcube/src/main/php/userSettings.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | // Check if we are a user 25 | OCP\User::checkLoggedIn(); 26 | OCP\App::checkAppEnabled('roundcube'); 27 | 28 | OCP\Util::addStyle('roundcube', 'userSettings'); 29 | OCP\Util::addScript('roundcube', 'userSettings'); 30 | 31 | // fill template 32 | $params = array(); 33 | $tmpl = new OCP\Template('roundcube', 'tpl.userSettings'); 34 | foreach ($params as $param) { 35 | $value = OCP\Config::getAppValue('roundcube', $param, ''); 36 | $tmpl -> assign($param, $value); 37 | } 38 | 39 | // workaround to detect OC version 40 | $ocVersion = @reset(OCP\Util::getVersion()); 41 | $tmpl->assign('ocVersion', $ocVersion); 42 | 43 | return $tmpl -> fetchPage(); 44 | -------------------------------------------------------------------------------- /roundcube/src/test/php/OC_RoundCube_App_IT.php: -------------------------------------------------------------------------------- 1 | getHtmlOutput(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /roundcube/src/test/php/OC_RoundCube_Login_IT.php: -------------------------------------------------------------------------------- 1 | login("positive@roundcube.owncloud.org", "42"); 28 | } catch (Exception $e) { 29 | print $e; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /roundcube/src/test/php/RoundCubeDBUtilTest.php: -------------------------------------------------------------------------------- 1 | getMockClass('OCP\Query', array('execute') ); 11 | $class::staticExpects($this->any()) 12 | ->method('execute') 13 | ->will($this->returnValue('')); 14 | $this->assertTrue(OC_RoundCube_DB_Util::tableExists(),"There should be an entry found"); 15 | 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /roundcube/src/test/php/mocks_RoundCubeApp.php: -------------------------------------------------------------------------------- 1 | filename 5 | */ 6 | public static $CLASSPATH = array(); 7 | 8 | public static $WEBROOT = ''; 9 | 10 | } 11 | 12 | class OC_L10N{ 13 | 14 | public function __construct($app) { 15 | } 16 | 17 | 18 | public function t($text, $parameters = array()) { 19 | } 20 | } 21 | 22 | class OC_App{ 23 | /** 24 | * Get the directory for the given app. 25 | * If the app is defined in multiple directories, the first one is taken. (false if not found) 26 | */ 27 | public static function getAppPath($appid) { 28 | 29 | return $appid; 30 | } 31 | } 32 | 33 | class OC_JSON{ 34 | 35 | public static function error($data) { 36 | } 37 | 38 | } 39 | 40 | class OC_Request { 41 | public static function serverHost(){ 42 | return 'localhost'; 43 | } 44 | } 45 | 46 | function p($print){ 47 | } 48 | -------------------------------------------------------------------------------- /roundcube/src/test/resources/bootstrap.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roundcube/src/test/resources/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /roundcube/src/test/webapp/frontend/mail.js: -------------------------------------------------------------------------------- 1 | describe('mail', function() { 2 | it("Roundcube.fillWindow - null", function() { 3 | spyOn(Roundcube, 'fillWindow'); 4 | var selector = {}; 5 | selector.length=0; 6 | Roundcube.fillWindow(selector); 7 | }); 8 | it("Roundcube.fillHeight - null", function() { 9 | spyOn(Roundcube, 'fillWindow'); 10 | var selector = {}; 11 | selector.length=0; 12 | Roundcube.fillHeight(selector); 13 | }); 14 | it("Roundcube.iFrameReady - basic", function() { 15 | Roundcube.iFrameReady(); 16 | }); 17 | it("Roundcube.iFrameReady - load complete", function() { 18 | Roundcube.iFrameReady(); 19 | }); 20 | 21 | }); -------------------------------------------------------------------------------- /roundcube/src/test/webapp/frontend/routes.js: -------------------------------------------------------------------------------- 1 | describe('routes', function() { 2 | it("refresh setting", function() { 3 | Roundcube.routes(); 4 | }); 5 | it("refresh - OC 6", function() { 6 | OC.currentUser = "admin"; 7 | Roundcube.refreshInterval = 1; 8 | OC.Router = ""; 9 | OC.Router.registerLoadedCallback = function(func) { 10 | }; 11 | var routesSet = Roundcube.routes(); 12 | expect(routesSet).toBe(true); 13 | 14 | }); 15 | it("refresh - OC 7", function() { 16 | OC.currentUser = "admin"; 17 | Roundcube.refreshInterval = 1; 18 | OC.Router = false; 19 | var routesSet = Roundcube.routes(); 20 | expect(routesSet).toBe(true); 21 | }); 22 | it("clear", function() { 23 | OC.currentUser = false; 24 | Roundcube.refreshInterval = 1; 25 | OC.Router = false; 26 | var routesSet = Roundcube.routes(); 27 | expect(routesSet).toBe(false); 28 | }); 29 | }); -------------------------------------------------------------------------------- /roundcube/src/test/webapp/frontend/userSettings.js: -------------------------------------------------------------------------------- 1 | beforeEach(function() { 2 | addFixture('userSettings.html'); 3 | }); 4 | afterEach(function() { 5 | clearMyFixtures(); 6 | }); 7 | 8 | describe('userSettings - without errors', function() { 9 | it('userSettings - empty dom', function() { 10 | clearMyFixtures(); 11 | Roundcube.userSettingsUI(); 12 | $("#usermail_update").click(); 13 | }); 14 | it('userSettings - empty dom', function() { 15 | Roundcube.userSettingsUI(); 16 | $("#usermail_update").click(); 17 | }); 18 | it('userSettings - error handling', function() { 19 | Roundcube.userSettingsUI(); 20 | $("#usermail_update").click(); 21 | }); 22 | 23 | }); -------------------------------------------------------------------------------- /roundcube/src/test/webapp/karma.conf.ci.js: -------------------------------------------------------------------------------- 1 | var baseConfig = require('./karma.conf.js'); 2 | 3 | module.exports = function(config){ 4 | // Load base config 5 | baseConfig(config); 6 | 7 | // Override base config 8 | config.set({ 9 | // web server port 10 | port: 10080, 11 | singleRun: true, 12 | autoWatch: false 13 | }); 14 | }; -------------------------------------------------------------------------------- /roundcube/src/test/webapp/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | 3 | module.exports = function(config) { 4 | config.set({ 5 | // base path, that will be used to resolve files and exclude 6 | basePath : '', 7 | 8 | // testing framework to use (jasmine/mocha/qunit/...) 9 | frameworks : [ 'jasmine' ], 10 | 11 | // list of files / patterns to load in the browser 12 | files : [ 13 | '../../../bower_components/jquery/dist/jquery.js', 14 | '../../../bower_components/jquery-ui/jquery-ui.js', 15 | 'fixtures/*.html', 16 | 'mocks/*.js', 17 | '../../main/php/js/*.js', 18 | 'utils.js', 19 | 'frontend/*.js' 20 | ], 21 | // list of files / patterns to exclude 22 | exclude : [ 'src/test/webapp/karma.conf*.js' ], 23 | 24 | preprocessors: { 25 | 'fixtures/*.html': ['html2js'] 26 | }, 27 | 28 | 29 | // web server port 30 | port : 9080, 31 | 32 | // level of logging 33 | // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG 34 | logLevel : config.LOG_INFO, 35 | 36 | // enable / disable watching file and executing tests whenever any file changes 37 | autoWatch : true, 38 | 39 | // Start these browsers, currently available: 40 | // - Chrome 41 | // - ChromeCanary 42 | // - Firefox 43 | // - Opera 44 | // - Safari (only Mac) 45 | // - PhantomJS 46 | // - IE (only Windows) 47 | browsers : [ 'PhantomJS' ], 48 | 49 | reporters : [ 'progress', 'junit' ], 50 | 51 | // the default configuration 52 | junitReporter : { 53 | outputFile : '../../../target/karma-test-results.xml', 54 | suite : 'roundcube - javascript unittests' 55 | }, 56 | // Continuous Integration mode 57 | // if true, it capture browsers, run tests and exit 58 | singleRun : false, 59 | 60 | }); 61 | }; 62 | -------------------------------------------------------------------------------- /roundcube/src/test/webapp/mocks/oc.js: -------------------------------------------------------------------------------- 1 | var OC={}; 2 | OC.generateUrl = function(str){return str}; 3 | -------------------------------------------------------------------------------- /roundcube/src/test/webapp/mocks/rc.js: -------------------------------------------------------------------------------- 1 | var Roundcube={}; 2 | -------------------------------------------------------------------------------- /roundcube/src/test/webapp/test-results.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /roundcube/src/test/webapp/utils.js: -------------------------------------------------------------------------------- 1 | function addFixture(html) { 2 | document.body.innerHTML = __html__['fixtures/' + html]; 3 | } 4 | 5 | function clearMyFixtures() { 6 | document.body.innerHTML = ''; 7 | } -------------------------------------------------------------------------------- /setupDevEnv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Packaging modules ...." 4 | mvn clean package 5 | echo "Packaging modules done." 6 | echo 7 | echo "Setting up apache and db ...." 8 | cd webtest/src/main/docker/app/ 9 | echo ---- 10 | 11 | echo "Using OwnCloud 8 and Roundcube 1.1 as default" 12 | ./setup_environment.sh --oc_version OC80 --rc_version RC11 --db_type mysql --db_name oc_testing --db_user oc_testing --db_password password --workspace ${DEV_DIR} 13 | echo "Setting up apache and db done." 14 | echo -------------------------------------------------------------------------------- /src/main/assembly/application.xml: -------------------------------------------------------------------------------- 1 | 3 | app 4 | 5 | zip 6 | 7 | ${artifactId} 8 | 9 | 10 | 11 | target/classes 12 | / 13 | 14 | 15 | 16 | 17 | target/classes/appinfo/info.xml 18 | /appinfo 19 | true 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | About 2 | Apps and enhancements for owncloud. -------------------------------------------------------------------------------- /src/site/images/Roundcube_AoD.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/src/site/images/Roundcube_AoD.graffle -------------------------------------------------------------------------------- /src/site/images/Roundcube_AoD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/src/site/images/Roundcube_AoD.png -------------------------------------------------------------------------------- /src/site/images/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/src/site/images/checker.png -------------------------------------------------------------------------------- /src/site/images/roundcube_adminSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/src/site/images/roundcube_adminSettings.png -------------------------------------------------------------------------------- /src/site/images/roundcube_adminSettings_customRoundcubeServer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/src/site/images/roundcube_adminSettings_customRoundcubeServer.png -------------------------------------------------------------------------------- /src/site/images/roundcube_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/src/site/images/roundcube_screenshot.png -------------------------------------------------------------------------------- /src/site/images/roundcube_userSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/src/site/images/roundcube_userSettings.png -------------------------------------------------------------------------------- /src/site/javascripts/scale.fix.js: -------------------------------------------------------------------------------- 1 | fixScale = function(doc) { 2 | 3 | var addEvent = 'addEventListener', 4 | type = 'gesturestart', 5 | qsa = 'querySelectorAll', 6 | scales = [1, 1], 7 | meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; 8 | 9 | function fix() { 10 | meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; 11 | doc.removeEventListener(type, fix, true); 12 | } 13 | 14 | if ((meta = meta[meta.length - 1]) && addEvent in doc) { 15 | fix(); 16 | scales = [.25, 1.6]; 17 | doc[addEvent](type, fix, true); 18 | } 19 | 20 | }; -------------------------------------------------------------------------------- /src/site/pdf.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | OwnCloud Apps 8 | Martin Reinhardt 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | OwnCloud Applications 17 | Version: ${project.version} 18 | User Guide 19 | ${project.name} 20 | ${project.organization.name} 21 | 22 | -------------------------------------------------------------------------------- /src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OwnCloud - Apps 5 | index.html 6 | 7 | 8 | lt.velykis.maven.skins 9 | reflow-maven-skin 10 | 1.1.0 11 | 12 | 13 | 14 | 15 | false 16 | true 17 | default 18 | true 19 | github 20 | 21 | OwnCloud Apps 22 | https://martinreinhardt-online.de/dev/docs/maven/owncloud-apps/ 23 | 24 | 25 | top 26 | About|Maven documentation|Download|Contribute 27 | 28 | Main 29 | Download 30 | 31 | OwnCloud Apps is a repository of usefull apps for OwnCloud by Martin Reinhardt]]> 32 | 33 | 34 | 35 | 36 | false 37 | 38 | 39 | false 40 | false 41 | 42 | 43 | false 44 | false 45 | 46 | 47 | 48 | false 49 | 50 | 51 | false 52 | 53 | 54 | 4 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 75 | 77 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/site/xdoc/ci.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CI 5 | 6 | 7 |
8 | Nightly build 9 |

10 | Test matrix 11 |
12 | 13 |
-------------------------------------------------------------------------------- /src/site/xdoc/download.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Continous Integration 5 | 6 | 7 |
8 | Latest release 9 |

10 | All releases 11 |
12 | 13 |
-------------------------------------------------------------------------------- /storagecharts2/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (grunt) { 4 | require('load-grunt-tasks')(grunt); 5 | require('time-grunt')(grunt); 6 | grunt.loadNpmTasks('grunt-bower-task'); 7 | 8 | grunt.initConfig({ 9 | bower: { 10 | install: { 11 | //just run 'grunt bower:install' and you'll see files from your Bower packages in lib directory 12 | 13 | options: { 14 | copy: false, 15 | } 16 | } 17 | }, 18 | yeoman: { 19 | // configurable paths 20 | app: require('./bower.json').appPath || 'src/main/webapp', 21 | dist: 'target' 22 | }, 23 | autoprefixer: { 24 | options: ['last 1 version'], 25 | dist: { 26 | files: [{ 27 | expand: true, 28 | cwd: '.tmp/styles/', 29 | src: '{,*/}*.css', 30 | dest: '.tmp/styles/' 31 | }] 32 | } 33 | }, 34 | connect: { 35 | options: { 36 | port: 9000, 37 | // Change this to '0.0.0.0' to access the server from outside. 38 | hostname: 'localhost', 39 | livereload: 35729 40 | }, 41 | livereload: { 42 | options: { 43 | open: true, 44 | base: [ 45 | '.tmp', 46 | '<%= yeoman.app %>', 47 | '.' 48 | ] 49 | } 50 | }, 51 | test: { 52 | options: { 53 | port: 9001, 54 | base: [ 55 | '.tmp', 56 | 'test', 57 | '<%= yeoman.app %>', 58 | 'bower_components' 59 | ] 60 | } 61 | }, 62 | dist: { 63 | options: { 64 | base: '<%= yeoman.dist %>' 65 | } 66 | } 67 | }, 68 | clean: { 69 | dist: { 70 | files: [{ 71 | dot: true, 72 | src: [ 73 | '.tmp', 74 | '<%= yeoman.dist %>/*', 75 | '!<%= yeoman.dist %>/.git*' 76 | ] 77 | }] 78 | }, 79 | server: '.tmp' 80 | }, 81 | jshint: { 82 | options: { 83 | jshintrc: '.jshintrc' 84 | }, 85 | all: [ 86 | 'Gruntfile.js', 87 | '<%= yeoman.app %>/scripts/{,*/}*.js' 88 | ] 89 | }, 90 | karma: { 91 | unit: { 92 | configFile: 'src/test/webapp/karma.conf.js', 93 | singleRun: true 94 | } 95 | }, 96 | }); 97 | 98 | grunt.registerTask('test', [ 99 | 'clean', 100 | 'autoprefixer', 101 | 'connect:test', 102 | 'karma' 103 | ]); 104 | 105 | grunt.registerTask('default', [ 106 | 'test' 107 | ]); 108 | }; 109 | -------------------------------------------------------------------------------- /storagecharts2/README.md: -------------------------------------------------------------------------------- 1 | StorageCharts 2 for owncloud 2 | ======== 3 | 4 | Storage usage and statistics by using HighCharts charts. Reenable StorageCharts App for OwnCloud (7+) 5 | 6 | Complete documentation usage in https://github.com/hypery2k/owncloud/wiki/StorageCharts2-Installation-and-Usage 7 | 8 | ### Issues known 9 | 10 | * Some cpu workload have been reported, the problem its poor DBMS engine such as Mysql, see similar issues at OC bugtracker 11 | * Some rare configs return bad used space if postgres or oracle are used as DB backend, all users are used same space. 12 | -------------------------------------------------------------------------------- /storagecharts2/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oc_storagecharts2", 3 | "version": "2.5.2", 4 | "repository": "git://github.com/hypery2k/owncloud", 5 | "devDependencies": { 6 | "jquery": "~2.1.1", 7 | "jquery-ui": "~1.11.1" 8 | }, 9 | "scripts": { 10 | "test": "grunt test" 11 | }, 12 | "homepage": "https://github.com/hypery2k/owncloud" 13 | } 14 | -------------------------------------------------------------------------------- /storagecharts2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oc_storagecharts2", 3 | "version": "2.5.4", 4 | "dependencies": {}, 5 | "repository": "git://github.com/hypery2k/owncloud", 6 | "devDependencies": { 7 | "grunt": "~0.4.1", 8 | "grunt-autoprefixer": "~0.2.0", 9 | "grunt-bower-task": "^0.4.0", 10 | "grunt-cli": "~0.1.13", 11 | "grunt-concurrent": "~0.3.0", 12 | "grunt-contrib-clean": "~0.5.0", 13 | "grunt-contrib-connect": "~0.5.0", 14 | "grunt-contrib-copy": "~0.4.1", 15 | "grunt-contrib-imagemin": "~0.9.3", 16 | "grunt-contrib-jshint": "~0.6.0", 17 | "grunt-google-cdn": "~0.2.0", 18 | "grunt-karma": "~0.6.2", 19 | "karma": "~0.10.2", 20 | "karma-chrome-launcher": "~0.1.0", 21 | "karma-coffee-preprocessor": "~0.1.0", 22 | "karma-firefox-launcher": "~0.1.0", 23 | "karma-html2js-preprocessor": "~0.1.0", 24 | "karma-jasmine": "~0.1.3", 25 | "karma-junit-reporter": "^0.2.2", 26 | "karma-phantomjs-launcher": "~0.1.0", 27 | "karma-requirejs": "~0.2.0", 28 | "karma-script-launcher": "~0.1.0", 29 | "load-grunt-tasks": "~0.1.0", 30 | "time-grunt": "~0.1.0" 31 | }, 32 | "engines": { 33 | "node": ">=0.8.0" 34 | }, 35 | "scripts": { 36 | "test": "grunt test" 37 | }, 38 | "homepage": "https://github.com/hypery2k/owncloud" 39 | } 40 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/ajax/data.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | OCP\JSON::checkLoggedIn(); 25 | 26 | $l = new OC_L10N('storagecharts2'); 27 | 28 | // build user list 29 | $uids = OCP\User::getUsers(); 30 | $users = array(); 31 | foreach ($uids as $user) { 32 | array_push($users,'{"name":"' . $user . '","displayName":"'.OCP\User::getDisplayName($user).'"}'); 33 | } 34 | 35 | if (array_key_exists('s',$_POST) && array_key_exists('k',$_POST) && 36 | is_numeric($_POST['s']) && in_array($_POST['k'], Array('hu_size','hu_size_hus','hu_ratio'))){ 37 | // Update and save the new configuration 38 | OC_DLStCharts::setUConfValue($_POST['k'], $_POST['s']); 39 | switch($_POST['k']){ 40 | case 'hu_size': 41 | OCP\JSON::encodedPrint(Array('data' => Array( 42 | 'chart' => OC_DLStChartsLoader::loadChart('chisto_us', $l), 43 | 'users' => $users))); 44 | break; 45 | case 'hu_size_hus': 46 | OCP\JSON::encodedPrint(Array('data' => Array( 47 | 'chart' => OC_DLStChartsLoader::loadChart('clines_usse', $l), 48 | 'users' => $users))); 49 | break; 50 | } 51 | } else { 52 | // default 53 | OCP\JSON::encodedPrint(Array('data' => Array( 54 | 'chart' => OC_DLStChartsLoader::loadChart('cpie_rfsus', $l), 55 | 'users' => $users))); 56 | } 57 | 58 | 59 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/ajax/userSettings.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | OCP\JSON::checkLoggedIn(); 25 | 26 | if(in_array($_POST['k'], Array('hu_size','sc_sort','hu_size_hus'))){ 27 | switch($_POST['o']){ 28 | case 'set': 29 | $i = NULL; 30 | if(is_array($_POST['i'])){ 31 | $i = serialize($_POST['i']); 32 | 33 | }elseif(is_numeric($_POST['i'])){ 34 | $i = $_POST['i']; 35 | } 36 | OC_DLStCharts::setUConfValue($_POST['k'], $i); 37 | break; 38 | case 'get': 39 | $v = OC_DLStCharts::getUConfValue($_POST['k']); 40 | OCP\JSON::encodedPrint(Array('r' => $v['uc_val'])); 41 | break; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/appinfo/database.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | *dbname* 4 | true 5 | false 6 | utf8 7 | 8 | *dbprefix*storagecharts2 9 | 10 | 11 | stc_id 12 | integer 13 | 0 14 | true 15 | 1 16 | true 17 | 4 18 | 19 | 20 | oc_uid 21 | text 22 | true 23 | 64 24 | 25 | 26 | stc_month 27 | integer 28 | true 29 | 6 30 | 31 | 32 | stc_dayts 33 | integer 34 | true 35 | 11 36 | 37 | 38 | stc_used 39 | float 40 | true 41 | 30 42 | 43 | 44 | stc_total 45 | float 46 | true 47 | 30 48 | 49 | 50 | stc_pk 51 | true 52 | 53 | stc_id 54 | ascending 55 | 56 | 57 | 58 |
59 | 60 | *dbprefix*storagecharts2_uconf 61 | 62 | 63 | uc_id 64 | integer 65 | 0 66 | true 67 | 1 68 | true 69 | 4 70 | 71 | 72 | oc_uid 73 | text 74 | true 75 | 64 76 | 77 | 78 | uc_key 79 | text 80 | true 81 | 64 82 | 83 | 84 | uc_val 85 | text 86 | true 87 | 255 88 | 89 | 90 | uc_pk 91 | true 92 | 93 | uc_id 94 | ascending 95 | 96 | 97 | 98 |
99 |
100 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | storagecharts2 4 | Storage Charts 2 Application 5 | AGPL 6 | Martin Reinhardt 7 | 5.0 8 | ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} 9 | 10 | 11 | Display storage charts, using HighCharts non-commercial free library (www.highcharts.com). 12 | For commercial 13 | usage please aquire the commercial libaray license for HighCharts. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | https://github.com/hypery2k/owncloud/wiki/Installation#storagecharts2 22 | 23 | 24 | https://github.com/hypery2k/owncloud 25 | 26 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/appinfo/routes.php: -------------------------------------------------------------------------------- 1 | create('storagecharts2_index', '/')->action( 4 | function($params){ 5 | require OC_App::getAppPath('storagecharts2').'/index.php'; 6 | } 7 | ); 8 | 9 | $this->create('storagecharts2_ajax_userSettings', 'ajax/userSettings.php')->actionInclude(OC_App::getAppPath('storagecharts2').'/ajax/userSettings.php'); 10 | $this->create('storagecharts2_ajax_data', 'ajax/data.php')->actionInclude(OC_App::getAppPath('storagecharts2').'/ajax/data.php'); 11 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/appinfo/version: -------------------------------------------------------------------------------- 1 | ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} -------------------------------------------------------------------------------- /storagecharts2/src/main/php/css/styles.css: -------------------------------------------------------------------------------- 1 | /** 2 | * ownCloud - DjazzLab Storage Charts plugin 3 | * 4 | * @author Xavier Beurois 5 | * @copyright 2012 Xavier Beurois www.djazz-lab.net 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE 9 | * License as published by the Free Software Foundation; either 10 | * version 3 of the License, or any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU AFFERO GENERAL PUBLIC LICENSE for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library. If not, see . 19 | * 20 | */ 21 | 22 | #storage-charts div.personalblock.topblock span{float:right;color:#BBB;font-style:italic;} 23 | 24 | #stc_sortable div.personalblock.bottomblock, #storage-charts div.personalblock.bottomblock{margin-bottom:1em;} 25 | #stc_sortable div.personalblock.titleblock, #storage-charts div.personalblock.titleblock{font-weight:bold;} 26 | #stc_sortable div.personalblock, #storage-charts div.personalblock{margin:1em 1em 0;padding:0.5em 1em;background: none repeat scroll 0 0 #F8F8F8;border-radius:0.5em 0.5em 0.5em 0.5em;color:#555555;text-shadow:0 1px 0 #FFFFFF;border:1px solid #DDDDDD;box-shadow:0 1px 1px #FFFFFF,0 1px 1px #FFFFFF inset;} 27 | 28 | #stc_frame{margin:1em 1em 0;} 29 | #stc_frame #stc_sortable div.personalblock{margin:0;margin-bottom:1em;} 30 | #stc_frame #stc_sortable div.personalblock h3{line-height:2.6;} 31 | #stc_frame #stc_sortable div.personalblock h3 img{vertical-align:middle;margin-right:10px;} 32 | #stc_frame #stc_sortable div.personalblock h3 span#selunits,#stc_frame #stc_sortable div.personalblock h3 span#selunits_hus{float:right;} 33 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/storagecharts2/src/main/php/img/loader.gif -------------------------------------------------------------------------------- /storagecharts2/src/main/php/img/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/storagecharts2/src/main/php/img/move.png -------------------------------------------------------------------------------- /storagecharts2/src/main/php/index.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | // Check if we are a user 25 | OCP\User::checkLoggedIn(); 26 | OCP\App::checkAppEnabled('storagecharts2'); 27 | 28 | OCP\Util::addStyle('storagecharts2', 'styles'); 29 | OCP\Util::addScript('storagecharts2', 'highcharts.min'); 30 | OCP\Util::addScript('storagecharts2', 'chosen.jquery.min'); 31 | OCP\Util::addScript('storagecharts2', 'chosen.proto.min'); 32 | OCP\Util::addScript('storagecharts2', 'storagecharts2'); 33 | 34 | $tmpl = new OCP\Template('storagecharts2', 'tpl.charts', 'user'); 35 | 36 | // Get data for all users if admin or just for the current user 37 | $displays = OC_DLStCharts::getUConfValue('c_disp', Array('uc_val' => 'a:3:{s:10:"cpie_rfsus";i:1;s:11:"clines_usse";i:1;s:9:"chisto_us";i:1;}')); 38 | $displays = unserialize($displays['uc_val']); 39 | $tmpl->assign('c_disp', $displays); 40 | 41 | $sc_sort = OC_DLStCharts::getUConfValue('sc_sort', Array('uc_val' => 'a:3:{i:0;s:10:"cpie_rfsus";i:1;s:11:"clines_usse";i:2;s:9:"chisto_us";}')); 42 | $tmpl->assign('sc_sort', unserialize($sc_sort['uc_val'])); 43 | 44 | if($displays['clines_usse']){ 45 | $hu_size = OC_DLStCharts::getUConfValue('hu_size', Array('uc_val' => 3)); 46 | $tmpl->assign('hu_size', $hu_size['uc_val']); 47 | } 48 | if($displays['chisto_us']){ 49 | $hu_size_hus = OC_DLStCharts::getUConfValue('hu_size_hus', Array('uc_val' => 3)); 50 | $tmpl->assign('hu_size_hus', $hu_size_hus['uc_val']); 51 | } 52 | 53 | $tmpl->printPage(); 54 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/de.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | * English texts 23 | * 24 | */ 25 | 26 | $TRANSLATIONS = Array( 27 | 'all users' => 'Alle Benutzer', 28 | 'April' => 'April', 29 | 'August' => 'August', 30 | 'December' => 'Dezember', 31 | 'February' => 'Februar', 32 | 'January' => 'Januar', 33 | 'July' => 'Juli', 34 | 'June' => 'Juni', 35 | 'March' => 'März', 36 | 'May' => 'Mai', 37 | 'November' => 'November', 38 | 'October' => 'Oktober', 39 | 'September' => 'September', 40 | 'Monthly Used Space Evolution' => 'Entwicklung des monatlich genutzten Speichers', 41 | 'Last 7 days' => 'Die letzten 7 Tage', 42 | 'Daily Used Space Evolution' => 'Entwicklung des täglich genutzten Speichers', 43 | 'Current ratio free space / used space' => 'Aktuelles Verhältnis zwischen freier Speicher / genutzter Speicher', 44 | 'for' => 'für', 45 | 'Free space' => 'Freier Speicher', 46 | 'Gigabytes (GB)' => 'Gigabytes (GB)', 47 | 'Kilobytes (KB)' => 'Kilobytes (KB)', 48 | 'Megabytes (MB)' => 'Megabytes (MB)', 49 | 'Terabytes (TB)' => 'Terabytes (TB)', 50 | 'Used space' => 'Genutzter Speicher', 51 | 'Average used space' => 'Durchschnittlich verbrauchter Speicher', 52 | 53 | // Personal settings 54 | 'Save' => 'Speichern', 55 | 'Save OK' => 'Speichern erfolgreich', 56 | 'Uncheck charts you do not want to display' => 'Diagramme abwählen die nicht angezeigt werden sollen' 57 | ); 58 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/en.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | * English texts 23 | * 24 | */ 25 | 26 | $TRANSLATIONS = Array( 27 | 'all users' => 'all users', 28 | 'April' => 'April', 29 | 'August' => 'August', 30 | 'Average used space' => 'Average used space', 31 | 'December' => 'December', 32 | 'February' => 'February', 33 | 'January' => 'January', 34 | 'July' => 'July', 35 | 'June' => 'June', 36 | 'March' => 'March', 37 | 'May' => 'May', 38 | 'November' => 'November', 39 | 'October' => 'October', 40 | 'September' => 'September', 41 | 'Monthly Used Space Evolution' => 'Monthly Used Space Evolution', 42 | 'Last 7 days' => 'Last 7 days', 43 | 'Daily Used Space Evolution' => 'Daily Used Space Evolution', 44 | 'Current ratio free space / used space' => 'Current ratio free space / used space', 45 | 'for' => 'for', 46 | 'Free space' => 'Free space', 47 | 'Gigabytes (GB)' => 'Gigabytes (GB)', 48 | 'Kilobytes (KB)' => 'Kilobytes (KB)', 49 | 'Megabytes (MB)' => 'Megabytes (MB)', 50 | 'Terabytes (TB)' => 'Terabytes (TB)', 51 | 'Used space' => 'Used space', 52 | 53 | // Personal settings 54 | 'Save' => 'Save', 55 | 'Save OK' => 'Save OK', 56 | 'Uncheck charts you do not want to display' => 'Uncheck charts you do not want to display' 57 | ); 58 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/es.php: -------------------------------------------------------------------------------- 1 | . 22 | * 23 | * Spanish texts by PICCORO McKAY Lenz 24 | * 25 | */ 26 | 27 | $TRANSLATIONS = Array( 28 | 'all users' => 'todos', 29 | 'April' => 'Abril', 30 | 'August' => 'Agosto', 31 | 'Average used space' => 'Promedio de espacio', 32 | 'December' => 'Diciembre', 33 | 'February' => 'Febrero', 34 | 'January' => 'Enero', 35 | 'July' => 'Julio', 36 | 'June' => 'Junio', 37 | 'March' => 'Marzo', 38 | 'May' => 'Mayo', 39 | 'November' => 'Noviembre', 40 | 'October' => 'Octubre', 41 | 'September' => 'Septiembre', 42 | 'Monthly Used Space Evolution' => 'Evolucion de espacio mensual', 43 | 'Last 7 days' => 'Ultimos 7 dias', 44 | 'Daily Used Space Evolution' => 'Evolucion de espacio diario', 45 | 'Current ratio free space / used space' => 'Relacion de espacio libre / usado', 46 | 'for' => 'para', 47 | 'Free space' => 'Spacio libre', 48 | 'Gigabytes (GB)' => 'Gigabytes (GB)', 49 | 'Kilobytes (KB)' => 'Kilobytes (KB)', 50 | 'Megabytes (MB)' => 'Megabytes (MB)', 51 | 'Terabytes (TB)' => 'Terabytes (TB)', 52 | 'Used space' => 'Espacio usado', 53 | 54 | // Personal settings 55 | 'Save' => 'Guardar', 56 | 'Save OK' => 'Guardado OK', 57 | 'Uncheck charts you do not want to display' => 'Descelecciona estatisticas que no quieras mostrar' 58 | ); 59 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/es_ES.php: -------------------------------------------------------------------------------- 1 | es.php -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/es_VE.php: -------------------------------------------------------------------------------- 1 | es.php -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/fr.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | * French texts 23 | * 24 | */ 25 | 26 | $TRANSLATIONS = Array( 27 | 'all users' => 'tous les utilisateurs', 28 | 'April' => 'Avril', 29 | 'August' => 'Août', 30 | 'December' => 'Décembre', 31 | 'February' => 'Février', 32 | 'January' => 'Janvier', 33 | 'July' => 'Juillet', 34 | 'June' => 'Juin', 35 | 'March' => 'Mars', 36 | 'May' => 'Mai', 37 | 'November' => 'Novembre', 38 | 'October' => 'Octobre', 39 | 'September' => 'Septembre', 40 | 'Monthly Used Space Evolution' => 'Evolution mensuelle de l\'espace utilisé', 41 | 'Last 7 days' => 'Les 7 derniers jours', 42 | 'Daily Used Space Evolution' => 'Evolution quotidienne de l\'espace utilisé', 43 | 'Current ratio free space / used space' => 'Ratio Espace libre / Espace utilisé actuel', 44 | 'for' => 'pour', 45 | 'Free space' => 'Espace libre', 46 | 'Gigabytes (GB)' => 'Gigabytes (GB)', 47 | 'Kilobytes (KB)' => 'Kilobytes (KB)', 48 | 'Megabytes (MB)' => 'Megabytes (MB)', 49 | 'Terabytes (TB)' => 'Terabytes (TB)', 50 | 'Used space' => 'Espace utilisé', 51 | 'Average used space' => 'Espace utilisé moyen', 52 | 53 | // Personal settings 54 | 'Save' => 'Enregistrer', 55 | 'Save OK' => 'Enregistrement OK', 56 | 'Uncheck charts you do not want to display' => 'Décochez les graphs que vous ne voulez pas afficher' 57 | ); 58 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/pt_BR.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | * Portuguese texts 23 | * 26/May/2012 - Translated by Tiago Soares (tbsoares@gmail.com) 24 | * 25 | */ 26 | 27 | $TRANSLATIONS = Array( 28 | 'all users' => 'Todos os usuários', 29 | 'April' => 'Abril', 30 | 'August' => 'Agosto', 31 | 'Average used space' => 'Média de espaço utilizado', 32 | 'December' => 'Dezembro', 33 | 'February' => 'Fevereiro', 34 | 'January' => 'Janeiro', 35 | 'July' => 'Julho', 36 | 'June' => 'Junho', 37 | 'March' => 'Março', 38 | 'May' => 'Maio', 39 | 'November' => 'Novembro', 40 | 'October' => 'Outubro', 41 | 'September' => 'Setembro', 42 | 'Monthly Used Space Evolution' => 'Evolução mensal do espaço utilizado', 43 | 'Last 7 days' => 'Últimos 7 dias', 44 | 'Daily Used Space Evolution' => 'Evolução diária do espaço utilizado', 45 | 'Current ratio free space / used space' => 'Proporção atual entre espaço livre / espaço utilizado', 46 | 'for' => 'para', 47 | 'Free space' => 'Espaço livre', 48 | 'Gigabytes (GB)' => 'Gigabytes (GB)', 49 | 'Kilobytes (KB)' => 'Kilobytes (KB)', 50 | 'Megabytes (MB)' => 'Megabytes (MB)', 51 | 'Terabytes (TB)' => 'Terabytes (TB)', 52 | 'Used space' => 'Espaço utlizado', 53 | 54 | // Personal settings 55 | 'Save' => 'Salvar', 56 | 'Save OK' => 'Salvo', 57 | 'Uncheck charts you do not want to display' => 'Desmarque os gráficos que não deseja exibir' 58 | ); 59 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/l10n/ru.php: -------------------------------------------------------------------------------- 1 | . 22 | * 23 | * Russnik(russian) texts by PICCORO McKAY Lenz 24 | * 25 | */ 26 | 27 | $TRANSLATIONS = Array( 28 | 'all users' => 'все', 29 | 'April' => 'Апрель', 30 | 'August' => 'Август', 31 | 'Average used space' => 'Средний пространство', 32 | 'December' => 'Декабрь', 33 | 'February' => 'Февраль', 34 | 'January' => 'Январь', 35 | 'July' => 'Июль', 36 | 'June' => 'Июнь', 37 | 'March' => 'Март', 38 | 'May' => 'Май', 39 | 'November' => 'Ноябрь', 40 | 'October' => 'Октябрь', 41 | 'September' => 'Сентябрь', 42 | 'Monthly Used Space Evolution' => 'Месячная динамика пространство', 43 | 'Last 7 days' => 'Ultimos 7 dias', 44 | 'Daily Used Space Evolution' => 'Ежедневно используемых пространство', 45 | 'Current ratio free space / used space' => 'Соотношение текущем пространстве/используемый', 46 | 'for' => 'для', 47 | 'Free space' => 'Предлагаемая площадь', 48 | 'Gigabytes (GB)' => 'гигабайт (GB)', 49 | 'Kilobytes (KB)' => 'килобайт (KB)', 50 | 'Megabytes (MB)' => 'мегабайт (MB)', 51 | 'Terabytes (TB)' => 'терабайт (TB)', 52 | 'Used space' => 'Занятое пространство', 53 | 54 | // Personal settings 55 | 'Save' => 'Сохранить', 56 | 'Save OK' => 'Сохранить OK', 57 | 'Uncheck charts you do not want to display' => 'Снимите флажки диаграммы которые которые Вы не хотите чтобы отобразить' 58 | ); 59 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/settings.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | // Check if we are a user 24 | OCP\User::checkLoggedIn(); 25 | OCP\App::checkAppEnabled('storagecharts2'); 26 | 27 | $tmpl = new OCP\Template('storagecharts2', 'tpl.settings'); 28 | 29 | if(isset($_POST['storagecharts2_disp']) && count($_POST['storagecharts2_disp']) <= 3){ 30 | $c = $_POST['storagecharts2_disp']; 31 | $c_disp = Array('cpie_rfsus'=>0,'clines_usse'=>0,'chisto_us'=>0); 32 | foreach(array_keys($c_disp) as $chart){ 33 | if(in_array($chart, $c)){ 34 | $c_disp[$chart] = 1; 35 | } 36 | } 37 | OC_DLStCharts::setUConfValue('c_disp', serialize($c_disp)); 38 | $tmpl->assign('stc_save_ok', TRUE); 39 | } 40 | 41 | $displays = OC_DLStCharts::getUConfValue('c_disp', Array('uc_val' => 'a:3:{s:10:"cpie_rfsus";i:1;s:11:"clines_usse";i:1;s:9:"chisto_us";i:1;}')); 42 | $tmpl->assign('displays', unserialize($displays['uc_val'])); 43 | 44 | // workaround to detect OC version 45 | $ocVersion = @reset(OCP\Util::getVersion()); 46 | $tmpl->assign('ocVersion', $ocVersion); 47 | return $tmpl->fetchPage(); 48 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/templates/tpl.charts.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | * JS minified by http://fmarcia.info/jsmin/test.html 23 | * 24 | */ 25 | 26 | 27 | foreach($_['sc_sort'] as $sc_sort){ 28 | if($_['c_disp'][$sc_sort]){ 29 | // add js for each sorting 30 | $scSort=$sc_sort; 31 | //$js = $js.'StorageCharts2.render(\"'.OC_DLStChartsLoader::loadChart($sc_sort, $l).'\");'; 32 | } 33 | } 34 | 35 | if($_['c_disp']['clines_usse']){ 36 | $huSize = $_['hu_size']; 37 | //$js = $js.'StorageCharts2.linesUsseUnitsSelect(\"'.$_['hu_size'].'\");'; 38 | } 39 | if($_['c_disp']['chisto_us']){ 40 | $huSizeHus = $_['hu_size_hus']; 41 | //$js = $js.'StorageCharts2.histoUsUnitsSelect(\"'.$_['hu_size_hus'].'\");'; 42 | } 43 | ?> 44 | 45 |
46 |
47 |
48 |
49 |
50 |
51 | 61 |
62 |

63 | 65 | t($sc_sort_title).' '.$l->t('for')); ?> 66 | "t('all users'):OCP\User::getDisplayName()); ?>" 67 |

68 |
69 |
70 |
71 | 73 |
74 |
75 | -------------------------------------------------------------------------------- /storagecharts2/src/main/php/templates/tpl.settings.php: -------------------------------------------------------------------------------- 1 | . 21 | * 22 | */ 23 | 24 | $ocVersion = $_['ocVersion']; 25 | $cfgClass = $ocVersion >= 7 ? 'section' : 'personalblock'; 26 | ?> 27 |
28 | 29 | 30 | 31 | 32 |
33 |

Storage Charts 2

34 | t('Uncheck charts you do not want to display')); ?> 35 |
36 | $is_enable){ 37 | if(strcmp($chart, 'cpie_rfsus') == 0){ 38 | $chart_title = 'Current ratio free space / used space'; 39 | }elseif(strcmp($chart, 'clines_usse') == 0){ 40 | $chart_title = 'Daily Used Space Evolution'; 41 | }else{ 42 | $chart_title = 'Monthly Used Space Evolution'; 43 | } ?> 44 |
45 | 48 | value="" /> 49 | t($chart_title)); ?> 50 |
51 | 52 | t('Save OK')); 55 | } ?> 56 |
57 |
58 | -------------------------------------------------------------------------------- /storagecharts2/src/main/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /storagecharts2/src/test/php/AppTest.php: -------------------------------------------------------------------------------- 1 | filename 5 | */ 6 | public static $CLASSPATH = array(); 7 | 8 | } 9 | 10 | class OC_L10N{ 11 | 12 | /** 13 | * @brief Translating 14 | * @param $text String The text we need a translation for 15 | * @param array $parameters default:array() Parameters for sprintf 16 | * @return \OC_L10N_String Translation or the same text 17 | * 18 | * Returns the translation. If no translation is found, $text will be 19 | * returned. 20 | */ 21 | public function t($text, $parameters = array()) { 22 | } 23 | } 24 | 25 | class OC_App{ 26 | /** 27 | * Get the directory for the given app. 28 | * If the app is defined in multiple directories, the first one is taken. (false if not found) 29 | */ 30 | public static function getAppPath($appid) { 31 | 32 | return $appid; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/fixtures/storagecharts.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Drag Drop on the chart title to re-order 4 |
5 |
6 |
7 |
-------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/frontend/chartSpec.js: -------------------------------------------------------------------------------- 1 | describe('run chart response', function() { 2 | it('run passed command', function() { 3 | spyOn(StorageCharts2,'runEval'); 4 | StorageCharts2.runEval 5 | StorageCharts2.evalResponse({chart:'console.log("test");'}); 6 | expect(StorageCharts2.runEval).toHaveBeenCalledWith('console.log("test");'); 7 | }); 8 | 9 | it('do not run undefined command', function() { 10 | spyOn(StorageCharts2,'runEval'); 11 | StorageCharts2.runEval 12 | StorageCharts2.evalResponse({}); 13 | expect(StorageCharts2.runEval).not.toHaveBeenCalled(); 14 | }); 15 | }); -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/frontend/unitsSpec.js: -------------------------------------------------------------------------------- 1 | beforeEach(function() { 2 | addFixture('storagecharts.html'); 3 | }); 4 | afterEach(function() { 5 | clearMyFixtures(); 6 | }); 7 | 8 | describe('init', function() { 9 | it(' should work without any element', function() { 10 | StorageCharts2.init(); 11 | }); 12 | }); 13 | 14 | describe('view charts', function() { 15 | it('unit selector helper - hu_size', function() { 16 | var select = document.createElement('select'); 17 | select.id = 'chunits_hus'; 18 | var option = document.createElement('option'); 19 | option.id = 'uc_val'; 20 | option.text = '3'; 21 | select.appendChild(option); 22 | document.body.appendChild(select); 23 | StorageCharts2.getHistoUsUnitsSelect(2048); 24 | }); 25 | it('unit selector helper - hus_size', function() { 26 | var select = document.createElement('select'); 27 | select.id = 'chunits'; 28 | var option = document.createElement('option'); 29 | option.id = 'uc_val'; 30 | option.text = '3'; 31 | select.appendChild(option); 32 | document.body.appendChild(select); 33 | StorageCharts2.getLinesUsseUnitsSelect(2048); 34 | }); 35 | }); -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/frontend/userSpec.js: -------------------------------------------------------------------------------- 1 | describe('user details', function() { 2 | it('get user info from existing uid', function() { 3 | StorageCharts2.evalResponse({users:['{\"name\":\"test\",\"displayName\":\"Mister Test\"}']}); 4 | expect(StorageCharts2.getUserFromId('test')).toBe('Mister Test'); 5 | }); 6 | it('get back uid from non-existing uid', function() { 7 | StorageCharts2.evalResponse({users:['{\"name\":\"test\",\"displayName\":\"Mister Test\"}']}); 8 | expect(StorageCharts2.getUserFromId('test2')).toBe('test2'); 9 | }); 10 | it('get back uid from without users saved before', function() { 11 | expect(StorageCharts2.getUserFromId('test2')).toBe('test2'); 12 | }); 13 | }); -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/karma.conf.ci.js: -------------------------------------------------------------------------------- 1 | var baseConfig = require('./karma.conf.js'); 2 | 3 | module.exports = function(config){ 4 | // Load base config 5 | baseConfig(config); 6 | 7 | // Override base config 8 | config.set({ 9 | // web server port 10 | port: 10080, 11 | singleRun: true, 12 | autoWatch: false 13 | }); 14 | }; -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | 3 | module.exports = function(config) { 4 | config.set({ 5 | // base path, that will be used to resolve files and exclude 6 | basePath : '', 7 | 8 | // testing framework to use (jasmine/mocha/qunit/...) 9 | frameworks : [ 'jasmine' ], 10 | 11 | // list of files / patterns to load in the browser 12 | files : [ 13 | '../../../bower_components/jquery/dist/jquery.js', 14 | '../../../bower_components/jquery-ui/jquery-ui.js', 15 | 'fixtures/*.html', 16 | 'mocks/*.js', 17 | '../../main/php/js/*.js', 18 | 'utils.js', 19 | 'frontend/*.js' 20 | ], 21 | // list of files / patterns to exclude 22 | exclude : [ 'src/test/webapp/karma.conf*.js' ], 23 | 24 | preprocessors: { 25 | 'fixtures/*.html': ['html2js'] 26 | }, 27 | 28 | 29 | // web server port 30 | port : 9080, 31 | 32 | // level of logging 33 | // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG 34 | logLevel : config.LOG_INFO, 35 | 36 | // enable / disable watching file and executing tests whenever any file changes 37 | autoWatch : true, 38 | 39 | // Start these browsers, currently available: 40 | // - Chrome 41 | // - ChromeCanary 42 | // - Firefox 43 | // - Opera 44 | // - Safari (only Mac) 45 | // - PhantomJS 46 | // - IE (only Windows) 47 | browsers : [ 'PhantomJS' ], 48 | 49 | reporters : [ 'progress', 'junit' ], 50 | 51 | // the default configuration 52 | junitReporter : { 53 | outputFile : '../../../target/karma-test-results.xml', 54 | suite : 'storagecharts2 - javascript unittests' 55 | }, 56 | // Continuous Integration mode 57 | // if true, it capture browsers, run tests and exit 58 | singleRun : false, 59 | 60 | }); 61 | }; 62 | -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/mocks/oc.js: -------------------------------------------------------------------------------- 1 | var OC={}; 2 | OC.generateUrl = function(str){return str}; 3 | var t = function(str){return str}; 4 | 5 | $.fn.extend({ 6 | chosen : function(d) { 7 | } 8 | }); 9 | 10 | $.fn.extend({ 11 | change : function(d) { 12 | } 13 | }); -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/mocks/rc.js: -------------------------------------------------------------------------------- 1 | var Roundcube={}; 2 | -------------------------------------------------------------------------------- /storagecharts2/src/test/webapp/utils.js: -------------------------------------------------------------------------------- 1 | function addFixture(html) { 2 | document.body.innerHTML = __html__['fixtures/' + html]; 3 | } 4 | 5 | function clearMyFixtures() { 6 | document.body.innerHTML = ''; 7 | } -------------------------------------------------------------------------------- /webtest/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | -------------------------------------------------------------------------------- /webtest/README.md: -------------------------------------------------------------------------------- 1 | UI integration tests 2 | ======== 3 | 4 | [![Build Status](https://martinreinhardt-online.de/jenkins/buildStatus/icon?job=OwnCloud_test)](https://martinreinhardt-online.de/jenkins/job/OwnCloud_test/) 5 | -------------------------------------------------------------------------------- /webtest/serenity.properties: -------------------------------------------------------------------------------- 1 | # more details on http://thucydides.info/docs/serenity-staging/#_running_serenity_tests_from_the_command_line 2 | serenity.browser.width = 1280 3 | serenity.browser.height = 1024 4 | serenity.verbose.steps = true 5 | serenity.timeout=3000 6 | serenity.step.delay = 800 7 | serenity.store.html.source = true 8 | serenity.reports.show.step.detail=true 9 | serenity.report.show.manual.tests=false 10 | serenity.report.show.releases=false 11 | serenity.take.screenshots = FOR_EACH_ACTION 12 | webdriver.timeouts.implicitlywait = 5000 13 | webdriver.driver = firefox -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/Dockerfile: -------------------------------------------------------------------------------- 1 | # ubuntu base image 2 | FROM java:7 3 | # prepare files 4 | RUN mkdir -p /tmp/oc_apps 5 | RUN mkdir -p /tmp/etc 6 | RUN mkdir -p /tmp/oc_apps/storagecharts2 7 | RUN mkdir -p /tmp/oc_apps/roundcube 8 | RUN mkdir -p /tmp/oc_apps/revealjsh 9 | ADD php.ini /etc/php5/fpm/ 10 | ADD mockimap.jar /root/ 11 | ADD etc/ /tmp/etc/ 12 | ADD bootstrap.sh /usr/bin/ 13 | ADD prepareMySQL.sh /tmp/ 14 | ADD prepareNginx.sh /tmp/ 15 | ADD setup_environment.sh /tmp/prepare.sh 16 | RUN chmod +x /tmp/prepareMySQL.sh 17 | RUN chmod +x /tmp/prepareNginx.sh 18 | RUN chmod +x /usr/bin/bootstrap.sh 19 | RUN chmod +x /tmp/prepare.sh 20 | 21 | # prepare env 22 | ENV DEBIAN_FRONTEND noninteractive 23 | RUN dpkg-divert --local --rename --add /sbin/initctl && ln -sf /bin/true /sbin/initctl 24 | 25 | # use google DNS 26 | RUN echo 'nameserver 8.8.8.8' > /etc/resolv.conf; echo 'nameserver 8.8.4.4' >> /etc/resolv.conf ; 27 | 28 | # owncloud 29 | RUN \ 30 | apt-get clean && \ 31 | apt-get update && \ 32 | apt-get -f install -y vim openssh-server net-tools bzip2 mysql-server unzip php5-cli php5-gd php5-pgsql php5-sqlite php5-mysqlnd php5-curl php5-intl php5-mcrypt php5-ldap php5-gmp php5-apcu php5-imagick php5-fpm smbclient nginx wget 33 | 34 | 35 | # prepare apps 36 | COPY . /tmp/oc_apps/ 37 | RUN \ 38 | cd /tmp/oc_apps/ && \ 39 | for z in *.zip; do unzip $z -d /tmp/oc_apps/; done 40 | 41 | # prepare mysql 42 | RUN /tmp/prepareMySQL.sh oc_testing oc_testing password 43 | 44 | 45 | RUN /tmp/prepare.sh --oc_version ${oc_version} --rc_version ${rc_version} --db_type ${db_type} 46 | 47 | RUN /tmp/prepareNginx.sh 48 | 49 | 50 | # setup phpmyadmin 51 | RUN \ 52 | /tmp/prepareMySQL.sh phpmyadmin oc_testing password && \ 53 | apt-get install phpmyadmin --yes --force-yes && \ 54 | cp /tmp/etc/phpmyadmin.conf /etc/phpmyadmin/config-db.php 55 | RUN \ 56 | ln -s /usr/share/phpmyadmin /var/www/phpmyadmin 57 | 58 | EXPOSE 49080 59 | 60 | # print versions 61 | RUN java -version 62 | 63 | ENTRYPOINT ["bootstrap.sh"] 64 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | java -jar /root/mockimap.jar --silent & 4 | /etc/init.d/php5-fpm restart & 5 | /etc/init.d/nginx restart & 6 | /etc/init.d/mysql restart & 7 | 8 | tail -F /var/log/nginx/*.log & 9 | tail -F /var/www/owncloud/data/owncloud.log -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/conf.yml: -------------------------------------------------------------------------------- 1 | # additional data require to create the Docker image 2 | packaging: 3 | # files to add to the build, usually used with ADD in the Dockerfile 4 | add: 5 | - ../roundcube/target/roundcube_v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}_build${env.BUILD_NUMBER}.zip 6 | - ../storagecharts2/target/storagecharts2_v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}_build${env.BUILD_NUMBER}.zip 7 | - ../revealjs/target/revealjs_v${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}_build${env.BUILD_NUMBER}.zip 8 | # optional list of port to expose on the host 9 | ports: 10 | - 49080 -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC60/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1 5 | RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION 6 | 7 | 8 | 9 | ErrorDocument 403 /core/templates/403.php 10 | ErrorDocument 404 /core/templates/404.php 11 | 12 | php_value upload_max_filesize 513M 13 | php_value post_max_size 513M 14 | php_value memory_limit 512M 15 | php_value mbstring.func_overload 0 16 | 17 | SetEnv htaccessWorking true 18 | 19 | 20 | 21 | RewriteEngine on 22 | RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 23 | RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L] 24 | RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L] 25 | RewriteRule ^.well-known/carddav /remote.php/carddav/ [R] 26 | RewriteRule ^.well-known/caldav /remote.php/caldav/ [R] 27 | RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L] 28 | RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L] 29 | RewriteRule ^apps/([^/]*)/(.*\.(php))$ index.php?app=$1&getfile=$2 [QSA,L] 30 | RewriteRule ^remote/(.*) remote.php [QSA,L] 31 | 32 | 33 | AddType image/svg+xml svg svgz 34 | AddEncoding gzip svgz 35 | 36 | 37 | DirectoryIndex index.php index.html 38 | 39 | AddDefaultCharset utf-8 40 | Options -Indexes 41 | 42 | ModPagespeed Off 43 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC60/config/config_mysql.php: -------------------------------------------------------------------------------- 1 | 'oc_testing', 4 | 'dbhost' => 'localhost', 5 | 'dbtableprefix' => 'oc6_', 6 | 'dbuser' => 'oc_testing', 7 | 'dbpassword' => 'password', 8 | array ( 9 | 0 => 'martinreinhardt-online.de', 10 | ), 11 | 'datadirectory' => '/var/www/owncloud/data', 12 | 'dbtype' => 'mysql', 13 | 'version' => '6.0.4.1', 14 | 'debug' => 'true', 15 | 'loglevel' => '0', 16 | 'maxZipInputSize' => '524288000', 17 | 'allowZipDownload' => true, 18 | 'versions' => 'true', 19 | 'instanceid' => 'oc6257b7b72a', 20 | 'passwordsalt' => 'ad95f91f4a301c24f21de74ef7b21e', 21 | 'maintenance' => false, 22 | 'theme' => '', 23 | 'installed' => true, 24 | ); -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC70/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1 5 | RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION 6 | 7 | 8 | 9 | 10 | php_value upload_max_filesize 513M 11 | php_value post_max_size 513M 12 | php_value memory_limit 512M 13 | php_value mbstring.func_overload 0 14 | 15 | SetEnv htaccessWorking true 16 | 17 | 18 | 19 | RewriteEngine on 20 | RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 21 | RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L] 22 | RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L] 23 | RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R] 24 | RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R] 25 | RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L] 26 | RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L] 27 | RewriteRule ^remote/(.*) remote.php [QSA,L] 28 | 29 | 30 | AddType image/svg+xml svg svgz 31 | AddEncoding gzip svgz 32 | 33 | 34 | DirectoryIndex index.php index.html 35 | 36 | AddDefaultCharset utf-8 37 | Options -Indexes 38 | 39 | ModPagespeed Off 40 | 41 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC70/config/.htaccess: -------------------------------------------------------------------------------- 1 | # line below if for Apache 2.4 2 | 3 | Require all denied 4 | 5 | 6 | # line below if for Apache 2.2 7 | 8 | deny from all 9 | 10 | 11 | # section for Apache 2.2 and 2.4 12 | IndexIgnore * 13 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC70/config/config_mysql.php: -------------------------------------------------------------------------------- 1 | 'oc_testing', 4 | 'dbhost' => 'localhost', 5 | 'dbtableprefix' => 'oc7_', 6 | 'dbuser' => 'oc_testing', 7 | 'dbpassword' => 'password', 8 | 'trusted_domains' => 9 | array ( 10 | 0 => 'martinreinhardt-online.de', 11 | ), 12 | 'datadirectory' => '/var/www/owncloud/data', 13 | 'dbtype' => 'mysql', 14 | 'version' => '7.0.5.2', 15 | 'debug' => 'true', 16 | 'loglevel' => '0', 17 | 'maxZipInputSize' => '524288000', 18 | 'allowZipDownload' => true, 19 | 'versions' => 'true', 20 | 'instanceid' => 'oc6257b7b72a', 21 | 'passwordsalt' => 'ad95f91f4a301c24f21de74ef7b21e', 22 | 'maintenance' => false, 23 | 'theme' => '', 24 | 'installed' => true 25 | ); -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC80/.htaccess: -------------------------------------------------------------------------------- 1 | # Version: 8.1.0 2 | 3 | 4 | 5 | SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1 6 | RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION 7 | 8 | 9 | 10 | 11 | # Add security and privacy related headers 12 | Header set X-Content-Type-Options "nosniff" 13 | Header set X-XSS-Protection "1; mode=block" 14 | Header set X-Robots-Tag "none" 15 | Header set X-Frame-Options "SAMEORIGIN" 16 | SetEnv modHeadersAvailable true 17 | 18 | 19 | # Add cache control for CSS and JS files 20 | 21 | Header set Cache-Control "max-age=7200, public" 22 | 23 | 24 | 25 | php_value upload_max_filesize 513M 26 | php_value post_max_size 513M 27 | php_value memory_limit 512M 28 | php_value mbstring.func_overload 0 29 | php_value always_populate_raw_post_data -1 30 | php_value default_charset 'UTF-8' 31 | php_value output_buffering off 32 | 33 | SetEnv htaccessWorking true 34 | 35 | 36 | 37 | RewriteEngine on 38 | RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 39 | RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L] 40 | RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L] 41 | RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R=301,L] 42 | RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R=301,L] 43 | RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L] 44 | RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L] 45 | RewriteRule ^remote/(.*) remote.php [QSA,L] 46 | RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] 47 | RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L] 48 | 49 | 50 | AddType image/svg+xml svg svgz 51 | AddEncoding gzip svgz 52 | 53 | 54 | DirectoryIndex index.php index.html 55 | 56 | AddDefaultCharset utf-8 57 | Options -Indexes 58 | 59 | ModPagespeed Off 60 | 61 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC80/.user.ini: -------------------------------------------------------------------------------- 1 | upload_max_filesize=513M 2 | post_max_size=513M 3 | memory_limit=512M 4 | mbstring.func_overload=0 5 | always_populate_raw_post_data=-1 6 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC80/config/.htaccess: -------------------------------------------------------------------------------- 1 | # line below if for Apache 2.4 2 | 3 | Require all denied 4 | 5 | 6 | # line below if for Apache 2.2 7 | 8 | deny from all 9 | 10 | 11 | # section for Apache 2.2 and 2.4 12 | IndexIgnore * 13 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC80/config/config_mysql.php: -------------------------------------------------------------------------------- 1 | 'ocz62k7kyswp', 4 | 'passwordsalt' => 'HufQfd3SBn/olmUQtiTaKEf6zc7ULs', 5 | 'secret' => 'PaBIKw.1cJ7K0xQRIL/BbILdBrSdwqlDmfBmA2oU4yBbWvR5', 6 | 'trusted_domains' => 7 | array ( 8 | 0 => 'martinreinhardt-online.de', 9 | ), 10 | 'datadirectory' => '/var/www/owncloud/data', 11 | 'dbtype' => 'mysql', 12 | 'version' => '8.0.0.7', 13 | 'dbname' => 'oc_testing', 14 | 'dbhost' => 'localhost', 15 | 'dbtableprefix' => 'oc8_', 16 | 'dbuser' => 'oc_testing', 17 | 'dbpassword' => 'password', 18 | 'installed' => true, 19 | ); -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC81/.htaccess: -------------------------------------------------------------------------------- 1 | # Version: 8.0.0 2 | 3 | 4 | 5 | SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1 6 | RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION 7 | 8 | 9 | 10 | 11 | php_value upload_max_filesize 513M 12 | php_value post_max_size 513M 13 | php_value memory_limit 512M 14 | php_value mbstring.func_overload 0 15 | php_value always_populate_raw_post_data -1 16 | 17 | SetEnv htaccessWorking true 18 | 19 | 20 | 21 | RewriteEngine on 22 | RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 23 | RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L] 24 | RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L] 25 | RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R] 26 | RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R] 27 | RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L] 28 | RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L] 29 | RewriteRule ^remote/(.*) remote.php [QSA,L] 30 | RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] 31 | RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L] 32 | 33 | 34 | AddType image/svg+xml svg svgz 35 | AddEncoding gzip svgz 36 | 37 | 38 | DirectoryIndex index.php index.html 39 | 40 | AddDefaultCharset utf-8 41 | Options -Indexes 42 | 43 | ModPagespeed Off 44 | 45 | 46 | 47 | Header set Cache-Control "max-age=7200, public" 48 | 49 | 50 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC81/.user.ini: -------------------------------------------------------------------------------- 1 | upload_max_filesize=513M 2 | post_max_size=513M 3 | memory_limit=512M 4 | mbstring.func_overload=0 5 | always_populate_raw_post_data=-1 6 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC81/config/.htaccess: -------------------------------------------------------------------------------- 1 | # line below if for Apache 2.4 2 | 3 | Require all denied 4 | 5 | 6 | # line below if for Apache 2.2 7 | 8 | deny from all 9 | 10 | 11 | # section for Apache 2.2 and 2.4 12 | IndexIgnore * 13 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC81/config/config_mysql.php: -------------------------------------------------------------------------------- 1 | 'ocz62k7kyswp', 4 | 'passwordsalt' => 'HufQfd3SBn/olmUQtiTaKEf6zc7ULs', 5 | 'secret' => 'PaBIKw.1cJ7K0xQRIL/BbILdBrSdwqlDmfBmA2oU4yBbWvR5', 6 | 'trusted_domains' => 7 | array ( 8 | 0 => 'martinreinhardt-online.de', 9 | ), 10 | 'datadirectory' => '/var/www/owncloud/data', 11 | 'dbtype' => 'mysql', 12 | 'version' => '8.1.0.8', 13 | 'dbname' => 'oc_testing', 14 | 'dbhost' => 'localhost', 15 | 'dbtableprefix' => 'oc8_', 16 | 'dbuser' => 'oc_testing', 17 | 'dbpassword' => 'password', 18 | 'installed' => true, 19 | ); -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC82/config/config_mysql.php: -------------------------------------------------------------------------------- 1 | 'ocz62k7kyswp', 4 | 'passwordsalt' => 'HufQfd3SBn/olmUQtiTaKEf6zc7ULs', 5 | 'secret' => 'PaBIKw.1cJ7K0xQRIL/BbILdBrSdwqlDmfBmA2oU4yBbWvR5', 6 | 'trusted_domains' => 7 | array ( 8 | 0 => 'martinreinhardt-online.de', 9 | ), 10 | 'datadirectory' => '/var/www/owncloud/data', 11 | 'dbtype' => 'mysql', 12 | 'version' => '8.2.2.2', 13 | 'dbname' => 'oc_testing', 14 | 'dbhost' => 'localhost', 15 | 'dbtableprefix' => 'oc8_', 16 | 'dbuser' => 'oc_testing', 17 | 'dbpassword' => 'password', 18 | 'installed' => true, 19 | 'theme' => '', 20 | 'loglevel' => 2, 21 | 'maintenance' => false, 22 | 'trashbin_retention_obligation' => 'auto', 23 | ); -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/OC90/config/config_mysql.php: -------------------------------------------------------------------------------- 1 | 'ocz62k7kyswp', 4 | 'passwordsalt' => 'HufQfd3SBn/olmUQtiTaKEf6zc7ULs', 5 | 'secret' => 'PaBIKw.1cJ7K0xQRIL/BbILdBrSdwqlDmfBmA2oU4yBbWvR5', 6 | 'trusted_domains' => 7 | array ( 8 | 0 => 'martinreinhardt-online.de', 9 | ), 10 | 'datadirectory' => '/var/www/owncloud/data', 11 | 'dbtype' => 'mysql', 12 | 'version' => '9.0.2.2', 13 | 'dbname' => 'oc_testing', 14 | 'dbhost' => 'localhost', 15 | 'dbtableprefix' => 'oc9_', 16 | 'dbuser' => 'oc_testing', 17 | 'dbpassword' => 'password', 18 | 'installed' => true, 19 | 'theme' => '', 20 | 'loglevel' => 2, 21 | 'maintenance' => false, 22 | 'trashbin_retention_obligation' => 'auto', 23 | ); -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC07/.htaccess: -------------------------------------------------------------------------------- 1 | # AddDefaultCharset UTF-8 2 | AddType text/x-component .htc 3 | 4 | 5 | php_flag display_errors Off 6 | php_flag log_errors On 7 | # php_value error_log logs/errors 8 | 9 | php_value upload_max_filesize 5M 10 | php_value post_max_size 6M 11 | php_value memory_limit 64M 12 | 13 | php_flag zlib.output_compression Off 14 | php_flag magic_quotes_gpc Off 15 | php_flag magic_quotes_runtime Off 16 | php_flag zend.ze1_compatibility_mode Off 17 | php_flag suhosin.session.encrypt Off 18 | 19 | #php_value session.cookie_path / 20 | php_flag session.auto_start Off 21 | php_value session.gc_maxlifetime 21600 22 | php_value session.gc_divisor 500 23 | php_value session.gc_probability 1 24 | 25 | # http://bugs.php.net/bug.php?id=30766 26 | php_value mbstring.func_overload 0 27 | 28 | 29 | 30 | RewriteEngine On 31 | RewriteRule ^favicon.ico$ skins/default/images/favicon.ico 32 | # security rules 33 | RewriteRule .svn/ - [F] 34 | RewriteRule ^README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ - [F] 35 | 36 | 37 | 38 | SetOutputFilter DEFLATE 39 | 40 | 41 | 42 | # replace 'append' with 'merge' for Apache version 2.2.9 and later 43 | #Header append Cache-Control public env=!NO_CACHE 44 | 45 | 46 | 47 | ExpiresActive On 48 | ExpiresDefault "access plus 1 month" 49 | 50 | 51 | FileETag MTime Size 52 | 53 | 54 | Options -Indexes 55 | 56 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC07/config/.htaccess: -------------------------------------------------------------------------------- 1 | Order allow,deny 2 | Deny from all -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC07/config/db.inc.php.dist: -------------------------------------------------------------------------------- 1 | 'application/vnd.ms-excel', 5 | 'xlm' => 'application/vnd.ms-excel', 6 | 'xla' => 'application/vnd.ms-excel', 7 | 'xlc' => 'application/vnd.ms-excel', 8 | 'xlt' => 'application/vnd.ms-excel', 9 | 'xlw' => 'application/vnd.ms-excel', 10 | 'pdf' => 'application/pdf', 11 | 'ppt' => 'application/vnd.ms-powerpoint', 12 | 'pps' => 'application/vnd.ms-powerpoint', 13 | 'pot' => 'application/vnd.ms-powerpoint', 14 | 'doc' => 'application/msword', 15 | 'dot' => 'application/msword', 16 | 'odc' => 'application/vnd.oasis.opendocument.chart', 17 | 'otc' => 'application/vnd.oasis.opendocument.chart-template', 18 | 'odf' => 'application/vnd.oasis.opendocument.formula', 19 | 'otf' => 'application/vnd.oasis.opendocument.formula-template', 20 | 'odg' => 'application/vnd.oasis.opendocument.graphics', 21 | 'otg' => 'application/vnd.oasis.opendocument.graphics-template', 22 | 'odi' => 'application/vnd.oasis.opendocument.image', 23 | 'oti' => 'application/vnd.oasis.opendocument.image-template', 24 | 'odp' => 'application/vnd.oasis.opendocument.presentation', 25 | 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 26 | 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 27 | 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 28 | 'odt' => 'application/vnd.oasis.opendocument.text', 29 | 'otm' => 'application/vnd.oasis.opendocument.text-master', 30 | 'ott' => 'application/vnd.oasis.opendocument.text-template', 31 | 'oth' => 'application/vnd.oasis.opendocument.text-web', 32 | 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', 33 | 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 34 | 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', 35 | 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 36 | 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 37 | 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 38 | 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 39 | 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 40 | 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 41 | 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 42 | 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 43 | 'xps' => 'application/vnd.ms-xpsdocument', 44 | 'rar' => 'application/x-rar-compressed', 45 | 'vcf' => 'text/vcard', 46 | 'ics' => 'text/calendar', 47 | ); 48 | 49 | ?> -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC08/.htaccess: -------------------------------------------------------------------------------- 1 | # AddDefaultCharset UTF-8 2 | AddType text/x-component .htc 3 | 4 | 5 | php_flag display_errors Off 6 | php_flag log_errors On 7 | # php_value error_log logs/errors 8 | 9 | php_value upload_max_filesize 5M 10 | php_value post_max_size 6M 11 | php_value memory_limit 64M 12 | 13 | php_flag zlib.output_compression Off 14 | php_flag magic_quotes_gpc Off 15 | php_flag magic_quotes_runtime Off 16 | php_flag zend.ze1_compatibility_mode Off 17 | php_flag suhosin.session.encrypt Off 18 | 19 | #php_value session.cookie_path / 20 | php_flag session.auto_start Off 21 | php_value session.gc_maxlifetime 21600 22 | php_value session.gc_divisor 500 23 | php_value session.gc_probability 1 24 | 25 | # http://bugs.php.net/bug.php?id=30766 26 | php_value mbstring.func_overload 0 27 | 28 | 29 | 30 | RewriteEngine On 31 | RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico 32 | # security rules 33 | RewriteRule .git - [F] 34 | RewriteRule ^/?(README(.md)?|INSTALL|LICENSE|SQL|bin|CHANGELOG)$ - [F] 35 | 36 | 37 | 38 | SetOutputFilter DEFLATE 39 | 40 | 41 | 42 | # replace 'append' with 'merge' for Apache version 2.2.9 and later 43 | #Header append Cache-Control public env=!NO_CACHE 44 | 45 | 46 | 47 | ExpiresActive On 48 | ExpiresDefault "access plus 1 month" 49 | 50 | 51 | FileETag MTime Size 52 | 53 | 54 | Options -Indexes 55 | 56 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC08/config/.htaccess: -------------------------------------------------------------------------------- 1 | Order allow,deny 2 | Deny from all -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC08/config/mimetypes.php: -------------------------------------------------------------------------------- 1 | 'application/vnd.ms-excel', 5 | 'xlm' => 'application/vnd.ms-excel', 6 | 'xla' => 'application/vnd.ms-excel', 7 | 'xlc' => 'application/vnd.ms-excel', 8 | 'xlt' => 'application/vnd.ms-excel', 9 | 'xlw' => 'application/vnd.ms-excel', 10 | 'pdf' => 'application/pdf', 11 | 'ppt' => 'application/vnd.ms-powerpoint', 12 | 'pps' => 'application/vnd.ms-powerpoint', 13 | 'pot' => 'application/vnd.ms-powerpoint', 14 | 'doc' => 'application/msword', 15 | 'dot' => 'application/msword', 16 | 'odc' => 'application/vnd.oasis.opendocument.chart', 17 | 'otc' => 'application/vnd.oasis.opendocument.chart-template', 18 | 'odf' => 'application/vnd.oasis.opendocument.formula', 19 | 'otf' => 'application/vnd.oasis.opendocument.formula-template', 20 | 'odg' => 'application/vnd.oasis.opendocument.graphics', 21 | 'otg' => 'application/vnd.oasis.opendocument.graphics-template', 22 | 'odi' => 'application/vnd.oasis.opendocument.image', 23 | 'oti' => 'application/vnd.oasis.opendocument.image-template', 24 | 'odp' => 'application/vnd.oasis.opendocument.presentation', 25 | 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 26 | 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 27 | 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 28 | 'odt' => 'application/vnd.oasis.opendocument.text', 29 | 'otm' => 'application/vnd.oasis.opendocument.text-master', 30 | 'ott' => 'application/vnd.oasis.opendocument.text-template', 31 | 'oth' => 'application/vnd.oasis.opendocument.text-web', 32 | 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', 33 | 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 34 | 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', 35 | 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 36 | 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 37 | 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 38 | 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 39 | 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 40 | 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 41 | 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 42 | 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 43 | 'xps' => 'application/vnd.ms-xpsdocument', 44 | 'rar' => 'application/x-rar-compressed', 45 | 'vcf' => 'text/vcard', 46 | 'ics' => 'text/calendar', 47 | ); 48 | 49 | ?> 50 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC09/.htaccess: -------------------------------------------------------------------------------- 1 | # AddDefaultCharset UTF-8 2 | AddType text/x-component .htc 3 | 4 | 5 | php_flag display_errors Off 6 | php_flag log_errors On 7 | # php_value error_log logs/errors 8 | 9 | php_value upload_max_filesize 5M 10 | php_value post_max_size 6M 11 | php_value memory_limit 64M 12 | 13 | php_flag zlib.output_compression Off 14 | php_flag magic_quotes_gpc Off 15 | php_flag magic_quotes_runtime Off 16 | php_flag zend.ze1_compatibility_mode Off 17 | php_flag suhosin.session.encrypt Off 18 | 19 | #php_value session.cookie_path / 20 | php_flag session.auto_start Off 21 | php_value session.gc_maxlifetime 21600 22 | php_value session.gc_divisor 500 23 | php_value session.gc_probability 1 24 | 25 | # http://bugs.php.net/bug.php?id=30766 26 | php_value mbstring.func_overload 0 27 | 28 | 29 | 30 | RewriteEngine On 31 | RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico 32 | # security rules 33 | RewriteRule \.git - [F] 34 | RewriteRule ^/?(README(.md)?|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ - [F] 35 | RewriteRule ^/?(SQL|bin) - [F] 36 | 37 | 38 | 39 | SetOutputFilter DEFLATE 40 | 41 | 42 | 43 | # replace 'append' with 'merge' for Apache version 2.2.9 and later 44 | #Header append Cache-Control public env=!NO_CACHE 45 | 46 | 47 | 48 | ExpiresActive On 49 | ExpiresDefault "access plus 1 month" 50 | 51 | 52 | FileETag MTime Size 53 | 54 | 55 | Options -Indexes 56 | 57 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC09/config/.htaccess: -------------------------------------------------------------------------------- 1 | Order allow,deny 2 | Deny from all -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC10/.htaccess: -------------------------------------------------------------------------------- 1 | # AddDefaultCharset UTF-8 2 | AddType text/x-component .htc 3 | 4 | 5 | php_flag display_errors Off 6 | php_flag log_errors On 7 | # php_value error_log logs/errors 8 | 9 | php_value upload_max_filesize 5M 10 | php_value post_max_size 6M 11 | php_value memory_limit 64M 12 | 13 | php_flag register_globals Off 14 | php_flag zlib.output_compression Off 15 | php_flag magic_quotes_gpc Off 16 | php_flag magic_quotes_runtime Off 17 | php_flag zend.ze1_compatibility_mode Off 18 | php_flag suhosin.session.encrypt Off 19 | 20 | #php_value session.cookie_path / 21 | php_flag session.auto_start Off 22 | php_value session.gc_maxlifetime 21600 23 | php_value session.gc_divisor 500 24 | php_value session.gc_probability 1 25 | 26 | 27 | 28 | RewriteEngine On 29 | RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico 30 | 31 | # security rules: 32 | # - deny access to files not containing a dot or starting with a dot 33 | # in all locations except installer directory 34 | RewriteRule ^(?!installer)(\.?[^\.]+)$ - [F] 35 | # - deny access to some locations 36 | RewriteRule ^/?(\.git|\.tx|SQL|bin|config|logs|temp|tests|program\/(include|lib|localization|steps)) - [F] 37 | # - deny access to some documentation files 38 | RewriteRule /?(README\.md|composer\.json-dist|composer\.json|package\.xml)$ - [F] 39 | 40 | 41 | 42 | SetOutputFilter DEFLATE 43 | 44 | 45 | 46 | # replace 'append' with 'merge' for Apache version 2.2.9 and later 47 | #Header append Cache-Control public env=!NO_CACHE 48 | 49 | 50 | 51 | ExpiresActive On 52 | ExpiresDefault "access plus 1 month" 53 | 54 | 55 | FileETag MTime Size 56 | 57 | 58 | Options -Indexes 59 | 60 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/RC11/.htaccess: -------------------------------------------------------------------------------- 1 | # AddDefaultCharset UTF-8 2 | AddType text/x-component .htc 3 | 4 | 5 | php_flag display_errors Off 6 | php_flag log_errors On 7 | # php_value error_log logs/errors 8 | 9 | php_value upload_max_filesize 5M 10 | php_value post_max_size 6M 11 | php_value memory_limit 64M 12 | 13 | php_flag register_globals Off 14 | php_flag zlib.output_compression Off 15 | php_flag magic_quotes_gpc Off 16 | php_flag magic_quotes_runtime Off 17 | php_flag suhosin.session.encrypt Off 18 | 19 | #php_value session.cookie_path / 20 | php_flag session.auto_start Off 21 | php_value session.gc_maxlifetime 21600 22 | php_value session.gc_divisor 500 23 | php_value session.gc_probability 1 24 | 25 | 26 | 27 | RewriteEngine On 28 | RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico 29 | 30 | # security rules: 31 | # - deny access to files not containing a dot or starting with a dot 32 | # in all locations except installer directory 33 | RewriteRule ^(?!installer)(\.?[^\.]+)$ - [F] 34 | # - deny access to some locations 35 | RewriteRule ^/?(\.git|\.tx|SQL|bin|config|logs|temp|tests|program\/(include|lib|localization|steps)) - [F] 36 | # - deny access to some documentation files 37 | RewriteRule /?(README\.md|composer\.json-dist|composer\.json|package\.xml)$ - [F] 38 | 39 | 40 | 41 | SetOutputFilter DEFLATE 42 | 43 | 44 | 45 | # replace 'append' with 'merge' for Apache version 2.2.9 and later 46 | #Header append Cache-Control public env=!NO_CACHE 47 | 48 | 49 | 50 | ExpiresActive On 51 | ExpiresDefault "access plus 1 month" 52 | 53 | 54 | FileETag MTime Size 55 | 56 | 57 | Options -Indexes 58 | 59 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/phpmyadmin.conf: -------------------------------------------------------------------------------- 1 | '70267274ab3eaec9cfff60a21e6970', 4 | "datadirectory" => '/Library/WebServer/Documents/data', 5 | "dbtype" => 'sqlite3', 6 | "version" => '4.0.8', 7 | "installed" => true, 8 | ); 9 | ?> 10 | -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/etc/sqllite/4.0.8/owncloud.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/webtest/src/main/docker/apps/etc/sqllite/4.0.8/owncloud.db -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/mockimap.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/webtest/src/main/docker/apps/mockimap.jar -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/oc_apps/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hypery2k/owncloud/05f85554f1f223b921fdffd74e0dc2995e3e6ed5/webtest/src/main/docker/apps/oc_apps/.gitignore -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/prepareMySQL.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DB_NAME=$1 4 | DB_USER=$2 5 | DB_PASS=$3 6 | 7 | # disable error log 8 | sed 's/^log_error/# log_error/' -i /etc/mysql/my.cnf 9 | 10 | # listen on all interfaces 11 | cat > /etc/mysql/conf.d/mysql-listen.cnf < /etc/mysql/conf.d/mysql-skip-name-resolv.cnf </dev/null 2>&1 40 | do 41 | timeout=$(($timeout - 1)) 42 | if [ $timeout -eq 0 ]; then 43 | echo "Could not connect to mysql server. Aborting..." 44 | exit 1 45 | fi 46 | sleep 1 47 | done 48 | 49 | if [ -n "${DB_NAME}" ]; then 50 | echo "Creating database ${DB_NAME}..." 51 | mysql --defaults-file=/etc/mysql/debian.cnf \ 52 | -e "CREATE DATABASE IF NOT EXISTS \`$DB_NAME\` DEFAULT CHARACTER SET \`utf8\` COLLATE \`utf8_unicode_ci\`;" 53 | if [ -n "${DB_USER}" ]; then 54 | echo "Creating user ${DB_USER}..." 55 | echo "Granting access to database \"$DB_USER\" for user \"${DB_USER}\"..." 56 | mysql --defaults-file=/etc/mysql/debian.cnf \ 57 | -e "GRANT ALL PRIVILEGES ON \`$DB_NAME\`.* TO '${DB_USER}' IDENTIFIED BY '${DB_PASS}' WITH GRANT OPTION;" 58 | fi 59 | fi 60 | fi -------------------------------------------------------------------------------- /webtest/src/main/docker/apps/prepareNginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | touch /var/log/nginx/access.log 4 | touch /var/log/nginx/error.log 5 | touch /var/www/owncloud/data/owncloud.log 6 | 7 | if [ -z "$SSL_CERT" ]; then 8 | echo "\nCopying nginx.conf without SSL support..\n" 9 | cp /tmp/etc/nginx.conf /etc/nginx/nginx.conf 10 | else 11 | echo "\nCopying nginx.conf with SSL support..\n" 12 | sed -i "s#-x-replace-cert-x-#$SSL_CERT#" /tmp/etc/nginx_ssl.conf 13 | sed -i "s#-x-replace-key-x-#$SSL_KEY#" /tmp/etc/nginx_ssl.conf 14 | cp /tmp/etc/nginx_ssl.conf /etc/nginx/nginx.conf 15 | fi 16 | chown -R www-data:www-data /var/www/owncloud -------------------------------------------------------------------------------- /webtest/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG,console,file,html 2 | # disable hibernate debugging logging 3 | log4j.logger.org.hibernate=ERROR 4 | log4j.logger.org.apache=ERROR 5 | log4j.logger.org.openqa=ERROR 6 | # enable owncloud webtest debugging logging 7 | log4j.logger.de.martinreinhardt.owncloud=DEBUG 8 | 9 | #console 10 | log4j.appender.console=org.apache.log4j.ConsoleAppender 11 | log4j.appender.console.Threshold=ERROR 12 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 13 | log4j.appender.console.layout.ConversionPattern=%d{ISO8601} [%-5p] %-12c: %m%n 14 | 15 | #output in .log 16 | log4j.appender.file=org.apache.log4j.RollingFileAppender 17 | log4j.appender.file.file=logs/owncloud_webtest.log 18 | log4j.appender.file.Threshold=DEBUG 19 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 20 | log4j.appender.file.layout.ConversionPattern=%d{ISO8601} [%-5p] %-12c: %m%n 21 | 22 | #output in .html 23 | log4j.appender.html=org.apache.log4j.RollingFileAppender 24 | log4j.appender.html.file=logs/owncloud_webtest_log.html 25 | log4j.appender.html.Threshold=DEBUG 26 | log4j.appender.html.layout=org.apache.log4j.HTMLLayout 27 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/OwnCloud.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: OwnCloud.java 30.05.2014, 00:42:38, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest; 9 | 10 | import net.thucydides.core.annotations.Feature; 11 | 12 | /** 13 | * @author mreinhardt 14 | * 15 | */ 16 | public class OwnCloud { 17 | 18 | @Feature 19 | public class Login { 20 | } 21 | 22 | @Feature 23 | public class Apps { 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/RoundCube.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: RoundCube.java 30.05.2014, 00:42:38, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest; 9 | 10 | import net.thucydides.core.annotations.Feature; 11 | 12 | /** 13 | * @author mreinhardt 14 | * 15 | */ 16 | public class RoundCube { 17 | 18 | @Feature 19 | public class ShowMailView { 20 | } 21 | 22 | @Feature 23 | public class AutoLogin { 24 | } 25 | 26 | @Feature 27 | public class ManualLogin { 28 | } 29 | 30 | @Feature 31 | public class RefreshSession { 32 | } 33 | 34 | @Feature 35 | public class Login { 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/StorageCharts.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: StorageCharts.java 30.05.2014, 00:42:38, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest; 9 | 10 | import net.thucydides.core.annotations.Feature; 11 | 12 | /** 13 | * @author mreinhardt 14 | * 15 | */ 16 | public class StorageCharts { 17 | 18 | @Feature 19 | public class ViewStats { 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/pages/AdminSettingsPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginPage.java 27.05.2014, 12:33:23, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.pages; 9 | 10 | import net.serenitybdd.core.annotations.findby.FindBy; 11 | import net.thucydides.core.annotations.Story; 12 | import net.thucydides.core.annotations.WithTag; 13 | 14 | import org.openqa.selenium.WebDriver; 15 | import org.openqa.selenium.WebElement; 16 | 17 | import de.martinreinhardt.owncloud.webtest.OwnCloud; 18 | import de.martinreinhardt.owncloud.webtest.util.AbstractPage; 19 | 20 | @Story(OwnCloud.Apps.class) 21 | @WithTag("Apps") 22 | public class AdminSettingsPage extends AbstractPage { 23 | 24 | @FindBy(id = "rcAdvancedSettings") 25 | private WebElement roundcubeAdvancedPanel; 26 | 27 | @FindBy(id = "autoLogin") 28 | private WebElement rcToogleAutologin; 29 | 30 | @FindBy(id = "rcAdminSubmit") 31 | private WebElement rcSaveSettings; 32 | 33 | @FindBy(id = "adminmail_success_message") 34 | private WebElement rcSaveSuccessMessage; 35 | 36 | /** 37 | * @param pWebDriver 38 | */ 39 | public AdminSettingsPage(final WebDriver pWebDriver) { 40 | super(pWebDriver); 41 | } 42 | 43 | public void go_to_roundcube_advancedsettings() { 44 | click(roundcubeAdvancedPanel); 45 | } 46 | 47 | public void toggle_roundcube_autologin() { 48 | click(rcToogleAutologin); 49 | } 50 | 51 | public void save_roundcube_settings() { 52 | click(rcSaveSettings); 53 | // scroll down 54 | getJavascriptExecutorFacade().executeScript("scroll(0, 150)"); 55 | element(rcSaveSuccessMessage).waitUntilVisible(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/pages/LoginPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginPage.java 27.05.2014, 12:33:23, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.pages; 9 | 10 | import net.serenitybdd.core.annotations.findby.FindBy; 11 | import net.thucydides.core.annotations.Story; 12 | import net.thucydides.core.annotations.WithTag; 13 | 14 | import org.openqa.selenium.WebDriver; 15 | import org.openqa.selenium.WebElement; 16 | 17 | import de.martinreinhardt.owncloud.webtest.OwnCloud; 18 | import de.martinreinhardt.owncloud.webtest.util.AbstractPage; 19 | 20 | @Story(OwnCloud.Login.class) 21 | @WithTag("Login") 22 | public class LoginPage extends AbstractPage { 23 | 24 | @FindBy(id = "user") 25 | private WebElement inputUsername; 26 | 27 | @FindBy(id = "password") 28 | private WebElement inputPassword; 29 | 30 | @FindBy(id = "submit") 31 | private WebElement submitLogin; 32 | 33 | public LoginPage(final WebDriver pWebDriver) { 34 | super(pWebDriver); 35 | } 36 | 37 | public void enter_username(final String keyword) { 38 | input(inputUsername, keyword); 39 | } 40 | 41 | public void enter_password(final String keyword) { 42 | input(inputPassword, keyword); 43 | } 44 | 45 | public boolean login_form_visible() { 46 | return inputUsername.isDisplayed() && inputPassword.isDisplayed() && submitLogin.isDisplayed(); 47 | } 48 | 49 | public void do_login() { 50 | click(submitLogin); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/pages/PortalPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginPage.java 27.05.2014, 12:33:23, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.pages; 9 | 10 | import net.serenitybdd.core.annotations.findby.FindBy; 11 | import net.thucydides.core.annotations.Story; 12 | import net.thucydides.core.annotations.WithTag; 13 | 14 | import org.openqa.selenium.WebDriver; 15 | import org.openqa.selenium.WebElement; 16 | 17 | import de.martinreinhardt.owncloud.webtest.OwnCloud; 18 | import de.martinreinhardt.owncloud.webtest.util.AbstractPage; 19 | 20 | @Story(OwnCloud.Apps.class) 21 | @WithTag("Apps") 22 | public class PortalPage extends AbstractPage { 23 | 24 | // APP MENU 25 | 26 | @FindBy(xpath = "//a[contains(@class,'menutoggle')]") 27 | private WebElement appMenu; 28 | 29 | // APPS 30 | 31 | @FindBy(xpath = "//*[@data-id='roundcube_index']/a/img") 32 | private WebElement roundcubeButton; 33 | 34 | @FindBy(xpath = "//*[@data-id='storagecharts2_index']/a/img") 35 | private WebElement storageChartsButton; 36 | 37 | // SETTINGS MENU 38 | 39 | @FindBy(xpath = "//*[@id='settings']//span") 40 | private WebElement settingsDropdownButton; 41 | 42 | @FindBy(xpath = "//*[@id='settings']//li[1]/a") 43 | private WebElement userSettingsDropdownButton; 44 | 45 | @FindBy(xpath = "//*[@id='settings']//li[3]/a") 46 | private WebElement adminSettingsDropdownButton; 47 | 48 | @FindBy(id = "logout") 49 | private WebElement logoutButton; 50 | 51 | /** 52 | * @param pWebDriver 53 | */ 54 | public PortalPage(final WebDriver pWebDriver) { 55 | super(pWebDriver); 56 | } 57 | 58 | public void go_to_roundcube_app() { 59 | try { 60 | click(appMenu); 61 | } catch (final Exception e) { 62 | } 63 | click(roundcubeButton); 64 | } 65 | 66 | public void go_to_storage_charts_app() { 67 | try { 68 | click(appMenu); 69 | } catch (final Exception e) { 70 | } 71 | click(storageChartsButton); 72 | } 73 | 74 | public void open_settings_dropdown() { 75 | element(settingsDropdownButton).waitUntilVisible(); 76 | click(settingsDropdownButton); 77 | } 78 | 79 | public void go_to_admin_settings() { 80 | open_settings_dropdown(); 81 | element(adminSettingsDropdownButton).waitUntilVisible(); 82 | click(adminSettingsDropdownButton); 83 | } 84 | 85 | public void go_to_user_settings() { 86 | open_settings_dropdown(); 87 | element(userSettingsDropdownButton).waitUntilVisible(); 88 | click(userSettingsDropdownButton); 89 | } 90 | 91 | public void do_logout() { 92 | open_settings_dropdown(); 93 | element(logoutButton).waitUntilVisible(); 94 | click(logoutButton); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/pages/StorageChartsPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginPage.java 27.05.2014, 12:33:23, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.pages; 9 | 10 | 11 | import net.serenitybdd.core.annotations.findby.FindBy; 12 | 13 | import org.openqa.selenium.NoSuchElementException; 14 | import org.openqa.selenium.WebDriver; 15 | import org.openqa.selenium.WebElement; 16 | 17 | import de.martinreinhardt.owncloud.webtest.util.AbstractPage; 18 | 19 | public class StorageChartsPage extends AbstractPage { 20 | 21 | @FindBy(id = "storagecharts2") 22 | private WebElement chartsDiv; 23 | 24 | public StorageChartsPage(final WebDriver pWebDriver) { 25 | super(pWebDriver); 26 | } 27 | 28 | public boolean isDlChartsDisplayed() { 29 | boolean loginVisible = false; 30 | try { 31 | loginVisible = chartsDiv.isDisplayed(); 32 | } catch (final NoSuchElementException e) { 33 | } 34 | return loginVisible; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/pages/UserSettingsPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginPage.java 27.05.2014, 12:33:23, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.pages; 9 | 10 | import net.serenitybdd.core.annotations.findby.FindBy; 11 | import net.thucydides.core.annotations.Story; 12 | import net.thucydides.core.annotations.WithTag; 13 | 14 | import org.openqa.selenium.By; 15 | import org.openqa.selenium.WebDriver; 16 | import org.openqa.selenium.WebElement; 17 | 18 | import de.martinreinhardt.owncloud.webtest.OwnCloud; 19 | import de.martinreinhardt.owncloud.webtest.util.AbstractPage; 20 | 21 | @Story(OwnCloud.Apps.class) 22 | @WithTag("Apps") 23 | public class UserSettingsPage extends AbstractPage { 24 | 25 | private final static String RC_ID_STATUS_MSG = "rc_usermail_success_message"; 26 | 27 | @FindBy(id = "roundcube") 28 | private WebElement rcSettingsPanel; 29 | 30 | @FindBy(id = "rc_mail_username") 31 | private WebElement rcUser; 32 | 33 | @FindBy(id = "rc_mail_password") 34 | private WebElement rcPassword; 35 | 36 | @FindBy(id = "rc_usermail_update") 37 | private WebElement rcSaveSettings; 38 | 39 | @FindBy(id = RC_ID_STATUS_MSG) 40 | private WebElement rcStatusMsg; 41 | 42 | @FindBy(id = "_mail_error_message") 43 | private WebElement rcErrorMsg; 44 | 45 | @FindBy(id = "rc_mail_error_empty_message") 46 | private WebElement rcEmptyErrorMsg; 47 | 48 | /** 49 | * @param pWebDriver 50 | */ 51 | public UserSettingsPage(final WebDriver pWebDriver) { 52 | super(pWebDriver); 53 | } 54 | 55 | public void go_to_roundcube_usersettings() { 56 | element(rcSettingsPanel).waitUntilVisible(); 57 | scrollTo(rcSettingsPanel); 58 | } 59 | 60 | public void set_rc_credentials(final String pLogin, final String pPassword) { 61 | element(rcUser).waitUntilVisible(); 62 | input(rcUser, pLogin); 63 | element(rcPassword).waitUntilVisible(); 64 | input(rcPassword, pPassword); 65 | } 66 | 67 | public boolean save_roundcube_settings() { 68 | click(rcSaveSettings); 69 | waitForRenderedElementsToBePresent(By.id(RC_ID_STATUS_MSG)); 70 | return rcStatusMsg.isDisplayed(); 71 | } 72 | 73 | public boolean error_displayed() { 74 | boolean errorDisplay = false; 75 | try { 76 | errorDisplay = rcErrorMsg.isDisplayed() || rcEmptyErrorMsg.isDisplayed(); 77 | } catch (Exception e) { 78 | 79 | } 80 | return errorDisplay; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/steps/AdminSteps.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginEndUserSteps.java 27.05.2014, 12:42:39, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.steps; 9 | 10 | import org.apache.commons.lang3.StringUtils; 11 | 12 | import net.thucydides.core.annotations.Step; 13 | import net.thucydides.core.pages.Pages; 14 | import de.martinreinhardt.owncloud.webtest.pages.AdminSettingsPage; 15 | 16 | /** 17 | * @author mreinhardt 18 | * 19 | */ 20 | public class AdminSteps extends PortalUserSteps { 21 | 22 | /** 23 | * Serial ID 24 | */ 25 | private static final long serialVersionUID = -3141185645424360620L; 26 | 27 | /** 28 | * @param pages 29 | */ 30 | public AdminSteps(final Pages pages) { 31 | super(pages); 32 | } 33 | 34 | // PAGE STEPS 35 | 36 | @Step 37 | public void go_to_roundcube_advancedsettings() { 38 | final String ocVersion = System.getProperty("oc_version"); 39 | // only pre OwnCloud 8 has advanced settings tab 40 | if (!StringUtils.startsWith(ocVersion, "OC80")) { 41 | onAdminSettingsPage().go_to_roundcube_advancedsettings(); 42 | } 43 | } 44 | 45 | @Step 46 | public void toggle_roundcube_autologin() { 47 | onAdminSettingsPage().toggle_roundcube_autologin(); 48 | } 49 | 50 | @Step 51 | public void apply_roundcube_settings() { 52 | onAdminSettingsPage().save_roundcube_settings(); 53 | } 54 | 55 | private AdminSettingsPage onAdminSettingsPage() { 56 | return getPages().currentPageAt(AdminSettingsPage.class); 57 | } 58 | 59 | // GETTER AND SETTER 60 | 61 | } 62 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/steps/LoginEndUserSteps.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginEndUserSteps.java 27.05.2014, 12:42:39, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.steps; 9 | 10 | import net.thucydides.core.annotations.Step; 11 | import net.thucydides.core.annotations.StepGroup; 12 | import net.thucydides.core.pages.Pages; 13 | import de.martinreinhardt.owncloud.webtest.pages.LoginPage; 14 | 15 | /** 16 | * @author mreinhardt 17 | * 18 | */ 19 | public class LoginEndUserSteps extends PortalUserSteps { 20 | 21 | /** 22 | * Serial ID 23 | */ 24 | private static final long serialVersionUID = 1000463057264545156L; 25 | 26 | private String username; 27 | 28 | private String password; 29 | 30 | /** 31 | * @param pages 32 | */ 33 | public LoginEndUserSteps(final Pages pages) { 34 | super(pages); 35 | } 36 | 37 | // PAGE STEPS 38 | 39 | @StepGroup 40 | public void enter_login_details() { 41 | enter_name(username); 42 | enter_password(password); 43 | login(); 44 | } 45 | 46 | @StepGroup 47 | public void do_login(final String pUsername, final String pPassword) { 48 | enter_name(pUsername); 49 | enter_password(pPassword); 50 | login(); 51 | } 52 | 53 | @Step 54 | public void enter_name(final String username) { 55 | onLoginPage().enter_username(username); 56 | } 57 | 58 | @Step 59 | public void enter_password(final String password) { 60 | onLoginPage().enter_password(password); 61 | } 62 | 63 | @Step 64 | public void login() { 65 | onLoginPage().do_login(); 66 | } 67 | 68 | private LoginPage onLoginPage() { 69 | return getPages().currentPageAt(LoginPage.class); 70 | } 71 | 72 | // GETTER AND SETTER 73 | 74 | /** 75 | * @return the username 76 | */ 77 | public String getUsername() { 78 | return username; 79 | } 80 | 81 | /** 82 | * @param username 83 | * the username to set 84 | */ 85 | public void setUsername(final String username) { 86 | this.username = username; 87 | } 88 | 89 | /** 90 | * @return the password 91 | */ 92 | public String getPassword() { 93 | return password; 94 | } 95 | 96 | /** 97 | * @param password 98 | * the password to set 99 | */ 100 | public void setPassword(final String password) { 101 | this.password = password; 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/steps/PortalUserSteps.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: PortalUserSteps.java 27.05.2014, 12:47:13, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.steps; 9 | 10 | import net.thucydides.core.annotations.Step; 11 | import net.thucydides.core.pages.Pages; 12 | import de.martinreinhardt.owncloud.webtest.pages.LoginPage; 13 | import de.martinreinhardt.owncloud.webtest.util.AbstractSteps; 14 | 15 | import static org.hamcrest.MatcherAssert.assertThat; 16 | 17 | /** 18 | * @author mreinhardt 19 | * 20 | */ 21 | public class PortalUserSteps extends AbstractSteps { 22 | 23 | /** 24 | * Serial ID 25 | */ 26 | private static final long serialVersionUID = 1981068809574040987L; 27 | 28 | /** 29 | * @param pages 30 | */ 31 | public PortalUserSteps(final Pages pages) { 32 | super(pages); 33 | } 34 | 35 | @Step 36 | public void enter_login_area() { 37 | assertThat("No login showing up", onLoginPage().login_form_visible()); 38 | // TODO back always 39 | // onPortalPage().go_to_login_page(); 40 | // onLoginPage(). 41 | } 42 | 43 | private LoginPage onLoginPage() { 44 | return getPages().currentPageAt(LoginPage.class); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/steps/RoundCubeSteps.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: PortalUserSteps.java 27.05.2014, 12:47:13, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.steps; 9 | 10 | import static org.hamcrest.MatcherAssert.assertThat; 11 | import static org.hamcrest.Matchers.notNullValue; 12 | import net.thucydides.core.annotations.Step; 13 | import net.thucydides.core.pages.Pages; 14 | import net.thucydides.core.reports.adaptors.xunit.model.TestError; 15 | import de.martinreinhardt.owncloud.webtest.pages.RoundCubePage; 16 | import de.martinreinhardt.owncloud.webtest.util.MockedImapServer; 17 | 18 | /** 19 | * @author mreinhardt 20 | * 21 | */ 22 | public class RoundCubeSteps extends PortalUserSteps { 23 | 24 | /** 25 | * Serial ID 26 | */ 27 | private static final long serialVersionUID = 1981068809574040987L; 28 | 29 | /** 30 | * @param pages 31 | */ 32 | public RoundCubeSteps(final Pages pages) { 33 | super(pages); 34 | } 35 | 36 | @Step 37 | public void is_showing_errors() throws TestError { 38 | final boolean errorMsgVisible = onWebmailPage().isErrorMessageDisplayed(); 39 | assertThat("There should be an error displayed.", errorMsgVisible); 40 | } 41 | 42 | @Step 43 | public void is_not_showing_errors() throws TestError { 44 | final boolean errorMsgVisible = onWebmailPage().isErrorMessageDisplayed(); 45 | assertThat("There should be no error displayed.", !errorMsgVisible); 46 | 47 | } 48 | 49 | @Step 50 | public boolean is_page_loaded() throws TestError { 51 | return onWebmailPage().isShowingRcFrame(); 52 | } 53 | 54 | @Step 55 | public String get_subject_of_first_email() throws TestError { 56 | return onWebmailPage().getFirstMessageSubject(); 57 | } 58 | 59 | @Step 60 | public void wait_on_app_page(final int pMinutes) throws TestError { 61 | waitFor(pMinutes).minutes(); 62 | } 63 | 64 | @Step 65 | public void message_should_have_a_valid_subject() throws TestError { 66 | final String subject = onWebmailPage().getFirstMessageSubject(); 67 | LOG.info("Got the following subject: " + subject); 68 | assertThat("Subject of first email shouldn't be empty", subject, notNullValue()); 69 | assertThat("Subject of first email should be: " + MockedImapServer.TEST_MAIL_SUBJECT, 70 | subject.contains(MockedImapServer.TEST_MAIL_SUBJECT)); 71 | } 72 | 73 | private RoundCubePage onWebmailPage() { 74 | return getPages().currentPageAt(RoundCubePage.class); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/steps/StorageChartsSteps.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: PortalUserSteps.java 27.05.2014, 12:47:13, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.steps; 9 | 10 | import static org.hamcrest.MatcherAssert.assertThat; 11 | import net.thucydides.core.annotations.Step; 12 | import net.thucydides.core.pages.Pages; 13 | import de.martinreinhardt.owncloud.webtest.pages.StorageChartsPage; 14 | 15 | /** 16 | * @author mreinhardt 17 | * 18 | */ 19 | public class StorageChartsSteps extends PortalUserSteps { 20 | 21 | /** 22 | * Serial ID 23 | */ 24 | private static final long serialVersionUID = 1981068809574040987L; 25 | 26 | /** 27 | * @param pages 28 | */ 29 | public StorageChartsSteps(final Pages pages) { 30 | super(pages); 31 | } 32 | 33 | @Step 34 | public void is_stats_visible() { 35 | final boolean statsVisible = onStorageChartsPage().isDlChartsDisplayed(); 36 | assertThat("No downloads stats are visible", statsVisible); 37 | } 38 | 39 | private StorageChartsPage onStorageChartsPage() { 40 | return getPages().currentPageAt(StorageChartsPage.class); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/tests/LoginIT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginTest.java 27.05.2014, 12:44:50, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.tests; 9 | 10 | import net.serenitybdd.junit.runners.SerenityRunner; 11 | import net.thucydides.core.annotations.Story; 12 | import net.thucydides.core.annotations.WithTag; 13 | import net.thucydides.core.annotations.WithTags; 14 | 15 | import org.junit.Test; 16 | import org.junit.runner.RunWith; 17 | 18 | import de.martinreinhardt.owncloud.webtest.OwnCloud; 19 | import de.martinreinhardt.owncloud.webtest.util.AbstractUITest; 20 | 21 | /** 22 | * @author mreinhardt 23 | * 24 | */ 25 | // @RunWith(ThucydidesParameterizedRunner.class) 26 | @Story(OwnCloud.Login.class) 27 | @WithTags({ 28 | @WithTag(type = "testtype", name = "smoke") 29 | }) 30 | @RunWith(SerenityRunner.class) 31 | // @UseTestDataFrom("src/test/resources/testdata/testdata_LoginTest_trying_Login_iFrame.csv") 32 | public class LoginIT extends AbstractUITest { 33 | 34 | @Test 35 | public void test_oc_login() { 36 | endUserLogin.enter_login_area(); 37 | endUserLogin.do_login("admin", "password"); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/tests/RoundCubeBasicIT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginTest.java 27.05.2014, 12:44:50, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.tests; 9 | 10 | import net.serenitybdd.junit.runners.SerenityRunner; 11 | import net.thucydides.core.annotations.Issues; 12 | import net.thucydides.core.annotations.Steps; 13 | import net.thucydides.core.annotations.Story; 14 | import net.thucydides.core.annotations.WithTag; 15 | import net.thucydides.core.annotations.WithTags; 16 | 17 | import org.junit.Test; 18 | import org.junit.runner.RunWith; 19 | 20 | import de.martinreinhardt.owncloud.webtest.RoundCube; 21 | import de.martinreinhardt.owncloud.webtest.steps.LoggedInUserSteps; 22 | import de.martinreinhardt.owncloud.webtest.util.AbstractUITest; 23 | 24 | /** 25 | * @author mreinhardt 26 | * 27 | */ 28 | @Story(RoundCube.Login.class) 29 | //@formatter:off 30 | @WithTags({ 31 | @WithTag(type = "app", value = "RoundCube"), 32 | @WithTag(type = "Feature", value = "login"), 33 | }) 34 | //@formatter:on 35 | @RunWith(SerenityRunner.class) 36 | public class RoundCubeBasicIT extends AbstractUITest { 37 | @Steps 38 | public LoggedInUserSteps loggedIn; 39 | 40 | @Test 41 | @Issues({ "#202" }) 42 | public void test_iframe_integration() { 43 | endUserLogin.enter_login_area(); 44 | endUserLogin.do_login("admin", "password"); 45 | loggedIn.go_to_roundcube_view(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/tests/RoundCubeMailNegativeIT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginTest.java 27.05.2014, 12:44:50, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.tests; 9 | 10 | import javax.mail.MessagingException; 11 | import javax.mail.internet.AddressException; 12 | 13 | import net.serenitybdd.junit.runners.SerenityRunner; 14 | import net.thucydides.core.annotations.Story; 15 | import net.thucydides.core.annotations.WithTag; 16 | import net.thucydides.core.reports.adaptors.xunit.model.TestError; 17 | 18 | import org.junit.Test; 19 | import org.junit.runner.RunWith; 20 | 21 | import com.icegreen.greenmail.user.UserException; 22 | 23 | import de.martinreinhardt.owncloud.webtest.RoundCube; 24 | 25 | /** 26 | * @author mreinhardt 27 | * 28 | */ 29 | @Story(RoundCube.ShowMailView.class) 30 | @WithTag(type = "app", value = "RoundCube") 31 | @RunWith(SerenityRunner.class) 32 | public class RoundCubeMailNegativeIT extends RoundCubeMockedMailIT { 33 | 34 | @Test 35 | public void test_roundcube_mail_with_errors() throws AddressException, MessagingException, UserException, TestError { 36 | runEmailTest(); 37 | } 38 | 39 | @Override 40 | public void executeTestStepsFrontend() throws TestError { 41 | endUserLogin.enter_login_area(); 42 | endUserLogin.do_login("negative@roundcube.owncloud.org", "42"); 43 | loggedInuserSteps.go_to_roundcube_view(); 44 | rcSteps.is_showing_errors(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/tests/RoundCubeMailPositiveIT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginTest.java 27.05.2014, 12:44:50, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.tests; 9 | 10 | import javax.mail.MessagingException; 11 | import javax.mail.internet.AddressException; 12 | 13 | import net.serenitybdd.junit.runners.SerenityRunner; 14 | import net.thucydides.core.annotations.Story; 15 | import net.thucydides.core.annotations.WithTag; 16 | import net.thucydides.core.annotations.WithTags; 17 | import net.thucydides.core.reports.adaptors.xunit.model.TestError; 18 | 19 | import org.apache.log4j.Logger; 20 | import org.junit.Test; 21 | import org.junit.runner.RunWith; 22 | 23 | import com.icegreen.greenmail.user.UserException; 24 | 25 | import de.martinreinhardt.owncloud.webtest.RoundCube; 26 | 27 | /** 28 | * @author mreinhardt 29 | * 30 | */ 31 | @Story(RoundCube.ShowMailView.class) 32 | @WithTags({ 33 | @WithTag(type = "app", value = "RoundCube"), 34 | @WithTag(type = "testtype", name = "smoke") 35 | }) 36 | @RunWith(SerenityRunner.class) 37 | public class RoundCubeMailPositiveIT extends RoundCubeMockedMailIT { 38 | 39 | // Logger 40 | protected static final Logger LOG = Logger.getLogger(RoundCubeMailPositiveIT.class); 41 | 42 | @Test 43 | public void test_roundcube_mail_without_errors() throws AddressException, MessagingException, UserException, 44 | TestError { 45 | runEmailTest(); 46 | } 47 | 48 | @Override 49 | public void executeTestStepsFrontend() throws TestError { 50 | endUserLogin.enter_login_area(); 51 | endUserLogin.do_login(//@formatter:off 52 | getPositiveEmailUserWhichIsAOcUser().getUsername(), 53 | getPositiveEmailUserWhichIsAOcUser().getPassword());//@formatter:on 54 | loggedInuserSteps.go_to_roundcube_view(); 55 | rcSteps.is_not_showing_errors(); 56 | rcSteps.message_should_have_a_valid_subject(); 57 | rcSteps.is_not_showing_errors(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/tests/RoundCubeMockedMailIT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginTest.java 27.05.2014, 12:44:50, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.tests; 9 | 10 | import javax.mail.MessagingException; 11 | import javax.mail.internet.AddressException; 12 | 13 | import net.thucydides.core.annotations.Steps; 14 | import net.thucydides.core.reports.adaptors.xunit.model.TestError; 15 | 16 | import com.icegreen.greenmail.user.UserException; 17 | import com.icegreen.greenmail.util.GreenMail; 18 | 19 | import de.martinreinhardt.owncloud.webtest.steps.LoggedInUserSteps; 20 | import de.martinreinhardt.owncloud.webtest.steps.RoundCubeSteps; 21 | import de.martinreinhardt.owncloud.webtest.util.AbstractUITest; 22 | import de.martinreinhardt.owncloud.webtest.util.EmailUserDetails; 23 | import de.martinreinhardt.owncloud.webtest.util.MockedImapServer; 24 | 25 | /** 26 | * @author mreinhardt 27 | * 28 | */ 29 | public abstract class RoundCubeMockedMailIT extends AbstractUITest { 30 | 31 | @Steps 32 | protected LoggedInUserSteps loggedInuserSteps; 33 | 34 | @Steps 35 | protected RoundCubeSteps rcSteps; 36 | 37 | public void runEmailTest() throws AddressException, MessagingException, UserException, TestError { 38 | 39 | GreenMail server = null; 40 | try { 41 | server = MockedImapServer.initTestServer(10); 42 | executeTestStepsFrontend(); 43 | } finally { 44 | if (server != null) { 45 | try { 46 | server.stop(); 47 | } catch (Exception e) { 48 | } 49 | } 50 | } 51 | } 52 | 53 | public static EmailUserDetails getPositiveEmailUserWhichIsAOcUser() { 54 | return MockedImapServer.getPositiveEmailUserWhichIsAOcUser(); 55 | } 56 | 57 | public static EmailUserDetails getPositiveEmailUserWhichIsNoOcUser() { 58 | return MockedImapServer.getPositiveEmailUserWhichIsNoOcUser(); 59 | } 60 | 61 | public abstract void executeTestStepsFrontend() throws TestError; 62 | } 63 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/tests/RoundCubeRefreshIT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginTest.java 27.05.2014, 12:44:50, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.tests; 9 | 10 | import javax.mail.MessagingException; 11 | import javax.mail.internet.AddressException; 12 | 13 | import net.serenitybdd.junit.runners.SerenityRunner; 14 | import net.thucydides.core.annotations.Issues; 15 | import net.thucydides.core.annotations.Story; 16 | import net.thucydides.core.annotations.WithTag; 17 | import net.thucydides.core.annotations.WithTags; 18 | import net.thucydides.core.reports.adaptors.xunit.model.TestError; 19 | 20 | import org.junit.Test; 21 | import org.junit.runner.RunWith; 22 | 23 | import com.icegreen.greenmail.user.UserException; 24 | 25 | import de.martinreinhardt.owncloud.webtest.RoundCube; 26 | import de.martinreinhardt.owncloud.webtest.util.EmailUserDetails; 27 | 28 | /** 29 | * @author mreinhardt 30 | * 31 | */ 32 | @Story(RoundCube.RefreshSession.class) 33 | //@formatter:off 34 | @WithTags({ 35 | @WithTag(type = "app", value = "RoundCube"), 36 | @WithTag(type = "Feature", value = "session refresh"), 37 | @WithTag(type = "Feature", value = "login"), 38 | }) 39 | //@formatter:on 40 | @WithTag(type = "app", value = "RoundCube") 41 | @RunWith(SerenityRunner.class) 42 | public class RoundCubeRefreshIT extends RoundCubeMockedMailIT { 43 | 44 | @Test 45 | @Issues({ "#228", "#230", "#230", "#237", "#247", "#251" }) 46 | public void test_roundcube_mail_refresh() throws AddressException, MessagingException, UserException, TestError { 47 | runEmailTest(); 48 | } 49 | 50 | /** 51 | * Check if roundcube session get's refreshed 52 | */ 53 | @Override 54 | public void executeTestStepsFrontend() throws TestError { 55 | endUserLogin.enter_login_area(); 56 | final EmailUserDetails user = getPositiveEmailUserWhichIsAOcUser(); 57 | endUserLogin.do_login(user.getUsername(), user.getPassword()); 58 | loggedInuserSteps.go_to_roundcube_view(); 59 | rcSteps.is_not_showing_errors(); 60 | rcSteps.message_should_have_a_valid_subject(); 61 | rcSteps.wait_on_app_page(6); 62 | rcSteps.is_not_showing_errors(); 63 | rcSteps.message_should_have_a_valid_subject(); 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/tests/StorageChartsBasicIT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: LoginTest.java 27.05.2014, 12:44:50, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.tests; 9 | 10 | import net.serenitybdd.junit.runners.SerenityRunner; 11 | import net.thucydides.core.annotations.Steps; 12 | import net.thucydides.core.annotations.Story; 13 | import net.thucydides.core.annotations.WithTag; 14 | import net.thucydides.core.annotations.WithTags; 15 | 16 | import org.junit.Test; 17 | import org.junit.runner.RunWith; 18 | 19 | import de.martinreinhardt.owncloud.webtest.StorageCharts; 20 | import de.martinreinhardt.owncloud.webtest.steps.LoggedInUserSteps; 21 | import de.martinreinhardt.owncloud.webtest.steps.StorageChartsSteps; 22 | import de.martinreinhardt.owncloud.webtest.util.AbstractUITest; 23 | 24 | /** 25 | * @author mreinhardt 26 | * 27 | */ 28 | @Story(StorageCharts.ViewStats.class) 29 | //@formatter:off 30 | @WithTags({ 31 | @WithTag(type = "app", value = "StorageCharts"), 32 | @WithTag(type = "feature", value = "use high charts"), 33 | @WithTag(type = "feature", value = "display stats"), 34 | @WithTag(type = "testtype", name = "smoke") 35 | }) 36 | //@formatter:on 37 | @RunWith(SerenityRunner.class) 38 | public class StorageChartsBasicIT extends AbstractUITest { 39 | 40 | @Steps 41 | public LoggedInUserSteps loggedIn; 42 | 43 | @Steps 44 | public StorageChartsSteps dlSteps; 45 | 46 | @Test 47 | public void view_download_charts() { 48 | endUserLogin.enter_login_area(); 49 | endUserLogin.do_login("admin", "password"); 50 | loggedIn.go_to_storagecharts_view(); 51 | dlSteps.is_stats_visible(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/util/AbstractSteps.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: AbstractSteps.java 27.05.2014, 12:41:31, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.util; 9 | 10 | import net.thucydides.core.pages.Pages; 11 | import net.thucydides.core.steps.ScenarioSteps; 12 | 13 | import org.apache.log4j.Logger; 14 | 15 | /** 16 | * @author mreinhardt 17 | * 18 | */ 19 | public class AbstractSteps extends ScenarioSteps { 20 | 21 | /** 22 | * Serial ID 23 | */ 24 | private static final long serialVersionUID = 8833613353941853393L; 25 | 26 | /** 27 | * Logger 28 | */ 29 | protected static final Logger LOG = Logger.getLogger(AbstractSteps.class); 30 | 31 | /** 32 | * @param pages 33 | */ 34 | public AbstractSteps(final Pages pages) { 35 | super(pages); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/util/AbstractUITest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: AbstractUITest.java 27.05.2014, 12:45:57, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.util; 9 | 10 | import net.thucydides.core.annotations.Managed; 11 | import net.thucydides.core.annotations.ManagedPages; 12 | import net.thucydides.core.annotations.Steps; 13 | import net.thucydides.core.pages.Pages; 14 | 15 | import org.apache.log4j.Logger; 16 | import org.openqa.selenium.WebDriver; 17 | 18 | import de.martinreinhardt.owncloud.webtest.steps.LoginEndUserSteps; 19 | 20 | /** 21 | * @author mreinhardt 22 | * 23 | */ 24 | public class AbstractUITest { 25 | 26 | // Logger 27 | protected static final Logger LOG = Logger.getLogger(AbstractUITest.class); 28 | 29 | @Managed(uniqueSession = true) 30 | public WebDriver webdriver; 31 | 32 | @ManagedPages 33 | public Pages pages; 34 | 35 | @Steps 36 | public LoginEndUserSteps endUserLogin; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /webtest/src/test/java/de/martinreinhardt/owncloud/webtest/util/EmailUserDetails.java: -------------------------------------------------------------------------------- 1 | /** 2 | * File: EmailUserDetails.java 03.06.2014, 08:40:02, author: mreinhardt 3 | * 4 | * Project: OwnCloud 5 | * 6 | * https://www.martinreinhardt-online.de/apps 7 | */ 8 | package de.martinreinhardt.owncloud.webtest.util; 9 | 10 | import java.io.Serializable; 11 | 12 | /** 13 | * @author mreinhardt 14 | * 15 | */ 16 | public class EmailUserDetails implements Serializable { 17 | 18 | /** 19 | * Serial ID 20 | */ 21 | private static final long serialVersionUID = 3665062712153958374L; 22 | 23 | private String username; 24 | 25 | private String email; 26 | 27 | private String password; 28 | 29 | /** 30 | * @return the username 31 | */ 32 | public String getUsername() { 33 | return username; 34 | } 35 | 36 | /** 37 | * @param username 38 | * the username to set 39 | */ 40 | public void setUsername(final String username) { 41 | this.username = username; 42 | } 43 | 44 | /** 45 | * @return the email 46 | */ 47 | public String getEmail() { 48 | return email; 49 | } 50 | 51 | /** 52 | * @param email 53 | * the email to set 54 | */ 55 | public void setEmail(final String email) { 56 | this.email = email; 57 | } 58 | 59 | /** 60 | * @return the password 61 | */ 62 | public String getPassword() { 63 | return password; 64 | } 65 | 66 | /** 67 | * @param password 68 | * the password to set 69 | */ 70 | public void setPassword(final String password) { 71 | this.password = password; 72 | } 73 | 74 | } 75 | --------------------------------------------------------------------------------