* deploy stuff added
* missing save icon added to the button * prod api url changed * slide preview fixed to cover the whole screen
This commit is contained in:
parent
6eb1cfaea1
commit
f72521ae82
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,8 @@
|
|||||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dynamic generated by deployer on remote host
|
||||||
|
revision.json
|
||||||
|
|
||||||
# compiled output
|
# compiled output
|
||||||
/dist
|
/dist
|
||||||
/dist-server
|
/dist-server
|
||||||
|
|||||||
63
deploy.php
Normal file
63
deploy.php
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Deployer;
|
||||||
|
require 'recipe/common.php';
|
||||||
|
|
||||||
|
set('ssh_type', 'native');
|
||||||
|
set('ssh_multiplexing', true);
|
||||||
|
|
||||||
|
// Configuration
|
||||||
|
|
||||||
|
// set('repository', 'git@domain.com:username/repository.git');
|
||||||
|
set('shared_files', []);
|
||||||
|
set('shared_dirs', []);
|
||||||
|
set('writable_dirs', []);
|
||||||
|
set('keep_releases', 3);
|
||||||
|
set('default_stage', 'production');
|
||||||
|
|
||||||
|
// Servers
|
||||||
|
host('vasgyuro.tsp')
|
||||||
|
->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');
|
||||||
32
htaccess
Normal file
32
htaccess
Normal file
@ -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]
|
||||||
|
|
||||||
|
<Limit GET POST PUT DELETE HEAD OPTIONS>
|
||||||
|
Require all granted
|
||||||
|
</Limit>
|
||||||
|
<LimitExcept GET POST PUT DELETE HEAD OPTIONS>
|
||||||
|
Require all denied
|
||||||
|
</LimitExcept>
|
||||||
|
|
||||||
|
<Files revision.json>
|
||||||
|
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"
|
||||||
|
</Files>
|
||||||
@ -38,16 +38,20 @@
|
|||||||
|
|
||||||
<button type="submit" class="ui button"
|
<button type="submit" class="ui button"
|
||||||
[class.positive]="canSave"
|
[class.positive]="canSave"
|
||||||
[class.disabled]="!canSave">Save</button>
|
[class.disabled]="!canSave"><i class="save outline icon"></i>Save</button>
|
||||||
<button type="button" class="ui button"
|
<button type="button" class="ui button"
|
||||||
[class.primary]="canPreview"
|
[class.primary]="canPreview"
|
||||||
[class.disabled]="!canPreview"
|
[class.disabled]="!canPreview"
|
||||||
(click)="preview()"><i class="search icon"></i>Preview</button>
|
(click)="preview()"><i class="search icon"></i>Preview</button>
|
||||||
|
<a class="ui button orange"
|
||||||
|
href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet"
|
||||||
|
target="_blank"><i class="question circle outline icon"></i>MD howto</a>
|
||||||
<a class="ui button"
|
<a class="ui button"
|
||||||
[routerLink]="['/admin/slides']"><i class="left angle icon"></i>Back to slides list</a>
|
[routerLink]="['/admin/slides']"><i class="left angle icon"></i>Back to slides list</a>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<app-slide [data]="renderedPreview"
|
<app-slide class="preview"
|
||||||
|
[data]="renderedPreview"
|
||||||
[preview]="true"
|
[preview]="true"
|
||||||
[(visible)]="previewVisible"
|
[(visible)]="previewVisible"
|
||||||
*ngIf="previewVisible"></app-slide>
|
*ngIf="previewVisible"></app-slide>
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
id="team"
|
id="team"
|
||||||
name="team"
|
name="team"
|
||||||
[(ngModel)]="selectedTeam"
|
[(ngModel)]="selectedTeam"
|
||||||
[options]="options"
|
|
||||||
labelField="name"
|
labelField="name"
|
||||||
[isSearchable]="false"
|
[isSearchable]="false"
|
||||||
#select>
|
#select>
|
||||||
|
|||||||
@ -14,6 +14,10 @@
|
|||||||
padding: 4rem;
|
padding: 4rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
:host.preview {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
:host ::ng-deep div.present {
|
:host ::ng-deep div.present {
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
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/'
|
commitTrackerApiUrl: 'https://mtas-trex.rnd.ki.sw.ericsson.se:8080/committracker/api/'
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user