diff --git a/client/app/app.js b/client/app/app.js
index 9066745..af33697 100644
--- a/client/app/app.js
+++ b/client/app/app.js
@@ -79,6 +79,7 @@ import NewRoleController from './designer/roles/new_role/new_role.controller';
import SearchRoleController from './designer/roles/search_role/search_role.controller';
import ComplexVarModalController from './modals/complex_var_modal/complex_var_modal.controller';
+import VideoController from './modals/video/video.controller';
import NewModuleController from './custom_modules/new_module/new_module.controller';
@@ -106,7 +107,7 @@ angular.module('app2App', [ngCookies, ngResource, ngSanitize, uiRouter, uiBootst
YAML, yamlFile, Projects, ansible, ansi2html, editor, customModules, system,
// Controllers
NewInventoryController, NewGroupController, NewHostController, ComplexVarController, NewPlaybookController, ExecutionController, NewPlayController, NewTaskController, ComplexVarModalController,
- NewFileController, NewRoleController, SearchRoleController, NewModuleController,
+ NewFileController, NewRoleController, SearchRoleController, NewModuleController, VideoController,
// Filters
dictToKeyValueArray, dictToKeyValueArraySimple, keyValueArrayToDict, keyValueArrayToArray, addDotInKey, removeDotInKey, json2yaml,
// Directives
diff --git a/client/app/main/main.component.js b/client/app/main/main.component.js
index f6dda0a..5e83297 100644
--- a/client/app/main/main.component.js
+++ b/client/app/main/main.component.js
@@ -5,10 +5,32 @@ import routing from './main.routes';
export class MainController {
/*@ngInject*/
- constructor($http, $scope, appConfig) {
+ constructor($http, $scope, $uibModal, appConfig) {
'ngInject';
this.$http = $http;
$scope.appVersion = appConfig.version;
+
+ this.videos = appConfig.videos;
+
+ this.showVideoModal = function (video) {
+ var modalInstance = $uibModal.open({
+ animation: true,
+ template: require('../modals/video/video.html'),
+ controller: 'VideoController',
+ size: 'md',
+ backdrop: 'static',
+ keyboard: false,
+ closeByEscape: false,
+ closeByDocument: false,
+ resolve: {
+ video: function () {
+ return video
+ }
+ }
+ });
+
+ };
+
}
}
diff --git a/client/app/main/main.html b/client/app/main/main.html
index 410a131..d70b7b8 100644
--- a/client/app/main/main.html
+++ b/client/app/main/main.html
@@ -2,11 +2,34 @@
Ansible Playbook generator and orchestrator
-
+
+
+
+ Try it !
+
+ > docker run mmumshad/ansible-playable
+
+
+
+
+
+
+
diff --git a/client/app/modals/video/video.controller.js b/client/app/modals/video/video.controller.js
new file mode 100644
index 0000000..a83a5da
--- /dev/null
+++ b/client/app/modals/video/video.controller.js
@@ -0,0 +1,19 @@
+'use strict';
+const angular = require('angular');
+
+/*@ngInject*/
+export function videoController($scope, $uibModalInstance,$sce, video) {
+
+ this.video_id = video.video_id;
+ $scope.video_url = $sce.trustAsResourceUrl("https://www.youtube.com/embed/" + this.video_id);
+
+ console.log("Video URL = " + this.video_url);
+
+ $scope.cancel = function () {
+ $uibModalInstance.close();
+ };
+}
+
+export default angular.module('webAppApp.video', [])
+ .controller('VideoController', videoController)
+ .name;
diff --git a/client/app/modals/video/video.controller.spec.js b/client/app/modals/video/video.controller.spec.js
new file mode 100644
index 0000000..036389e
--- /dev/null
+++ b/client/app/modals/video/video.controller.spec.js
@@ -0,0 +1,17 @@
+'use strict';
+
+describe('Controller: VideoCtrl', function() {
+ // load the controller's module
+ beforeEach(module('webAppApp.video'));
+
+ var VideoCtrl;
+
+ // Initialize the controller and a mock scope
+ beforeEach(inject(function($controller) {
+ VideoCtrl = $controller('VideoCtrl', {});
+ }));
+
+ it('should ...', function() {
+ expect(1).to.equal(1);
+ });
+});
diff --git a/client/app/modals/video/video.html b/client/app/modals/video/video.html
new file mode 100644
index 0000000..a8aadc9
--- /dev/null
+++ b/client/app/modals/video/video.html
@@ -0,0 +1,12 @@
+
+
diff --git a/server/config/environment/shared.js b/server/config/environment/shared.js
index 69720d0..0f27c68 100644
--- a/server/config/environment/shared.js
+++ b/server/config/environment/shared.js
@@ -27,6 +27,30 @@ exports = module.exports = {
},
- disablePlayboookExecution: process.env.DISABLE_PLAYBOOK_EXECUTION || false
+ disablePlayboookExecution: process.env.DISABLE_PLAYBOOK_EXECUTION || false,
+
+ videos: [
+ {
+ title: 'Overview',
+ type: 'overview',
+ video_id: '6sE0Gqcw_4U'
+ },
+ {
+ title: 'Getting Started',
+ type: 'getting_started'
+ },
+ {
+ title: 'Google Cloud Example',
+ type: 'google_cloud'
+ },
+ {
+ title: 'VMWare Example',
+ type: 'vmware'
+ },
+ {
+ title: 'Custom Modules',
+ type: 'custom_module'
+ }
+ ]
};