diff --git a/.gitignore b/.gitignore
index eabf65e..7dd4f61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,8 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
+# dynamic generated by deployer on remote host
+revision.json
+
# compiled output
/dist
/dist-server
diff --git a/deploy.php b/deploy.php
new file mode 100644
index 0000000..414a643
--- /dev/null
+++ b/deploy.php
@@ -0,0 +1,63 @@
+stage('production')
+ ->user('edvidan')
+ ->forwardAgent()
+ ->set('ng_basehref', '/mtas-tv/')
+ ->set('ng_target', 'production')
+ ->set('ng_environment', 'prod')
+ ->set('env_vars', 'NODE_ENV=production')
+ ->set('deploy_path', '/home/edvidan/applications/mtas-tv');
+
+// Tasks
+desc('Prepare release');
+task('deploy:ng-prepare', function() {
+ runLocally("ng build --base-href={{ng_basehref}} --target={{ng_target}} --environment={{ng_environment}}");
+ runLocally("tar -cJf dist.tar.xz dist");
+});
+
+desc('Upload release');
+task('deploy:ng-upload', function() {
+ upload("dist.tar.xz", "{{release_path}}/dist.tar.xz");
+ run("tar -C {{release_path}} -xJf {{release_path}}/dist.tar.xz");
+ run("rm -f {{release_path}}/dist.tar.xz");
+ runLocally("rm -rf dist.tar.xz dist");
+ upload("htaccess", "{{release_path}}/dist/.htaccess");
+
+ $revision = get("release_name");
+ within('{{release_path}}', function () use ($revision){
+ run("echo $revision > dist/revision.json");
+ });
+});
+
+desc('Deploy your project');
+task('deploy', [
+ 'deploy:prepare',
+ 'deploy:lock',
+ 'deploy:release',
+ 'deploy:ng-prepare',
+ 'deploy:ng-upload',
+ 'deploy:shared',
+ 'deploy:clear_paths',
+ 'deploy:symlink',
+ 'deploy:unlock',
+ 'cleanup',
+]);
+after('deploy', 'success');
diff --git a/htaccess b/htaccess
new file mode 100644
index 0000000..c749114
--- /dev/null
+++ b/htaccess
@@ -0,0 +1,32 @@
+RewriteEngine On
+# The following rule tells Apache that if the requested filename
+# exists, simply serve it.
+RewriteCond %{REQUEST_FILENAME} -s [OR]
+RewriteCond %{REQUEST_FILENAME} -l [OR]
+RewriteCond %{REQUEST_FILENAME} -d
+RewriteRule ^.*$ - [NC,L]
+
+# The following rewrites all other queries to index.php. The
+# condition ensures that if you are using Apache aliases to do
+# mass virtual hosting, the base path will be prepended to
+# allow proper resolution of the index.php file; it will work
+# in non-aliased environments as well, providing a safe, one-size
+# fits all solution.
+RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
+RewriteRule ^(.*) - [E=BASE:%1]
+RewriteRule ^(.*)$ %{ENV:BASE}index.html [NC,L]
+
+
+ Require all granted
+
+
+ Require all denied
+
+
+
+ FileETag None
+ Header unset ETag
+ Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
+ Header set Pragma "no-cache"
+ Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
+
diff --git a/src/app/admin/slide-editor/slide-editor.component.html b/src/app/admin/slide-editor/slide-editor.component.html
index c51d636..d9ffe2d 100644
--- a/src/app/admin/slide-editor/slide-editor.component.html
+++ b/src/app/admin/slide-editor/slide-editor.component.html
@@ -38,16 +38,20 @@
+ [class.disabled]="!canSave">Save
+ MD howto
Back to slides list
-
diff --git a/src/app/display/settings/settings.component.html b/src/app/display/settings/settings.component.html
index afce8b9..6ca19ac 100644
--- a/src/app/display/settings/settings.component.html
+++ b/src/app/display/settings/settings.component.html
@@ -9,7 +9,6 @@
id="team"
name="team"
[(ngModel)]="selectedTeam"
- [options]="options"
labelField="name"
[isSearchable]="false"
#select>
diff --git a/src/app/display/slide/slide.component.css b/src/app/display/slide/slide.component.css
index f408d92..5903aa9 100644
--- a/src/app/display/slide/slide.component.css
+++ b/src/app/display/slide/slide.component.css
@@ -14,6 +14,10 @@
padding: 4rem;
text-align: center;
}
+:host.preview {
+ position: absolute;
+ z-index: 1;
+}
:host ::ng-deep div.present {
max-height: 100%;
}
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 7f8e77d..16be19b 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -1,5 +1,5 @@
export const environment = {
production: true,
- apiUrl: 'http://localhost:8080',
+ apiUrl: 'http://ttt-api.tsp.eth.ericsson.se/mtastv-api',
commitTrackerApiUrl: 'https://mtas-trex.rnd.ki.sw.ericsson.se:8080/committracker/api/'
};