diff --git a/handlers/www/assets/app.js b/handlers/www/assets/app.js index f1e9201..0f1cab7 100644 --- a/handlers/www/assets/app.js +++ b/handlers/www/assets/app.js @@ -847,6 +847,44 @@ return "None"; } }]) + .controller("SurveyToastController", function($mdToast) { + var ctrl = this; + ctrl.openSurvey = function() { + $mdToast.hide("ok"); + } + ctrl.closeToast = function() { + $mdToast.hide(); + } + }) + .component('surveyRequest', { + template : "Give feedback", + controller : function($mdToast, $timeout) { + var $ctrl = this; + + $ctrl.$onInit = function() { + window.$mdToast = $mdToast; + $timeout(function() { + $mdToast.show({ + hideDelay: 0, + position: 'bottom right', + controller: "SurveyToastController", + controllerAs: "ctrl", + bindToControlller: true, + templateUrl: "survey-toast.html" + }).then(function (result) { + if (result === "ok") { + $ctrl.openSurvey(); + } + }); + }, 300000); // Display toast after five minutes + } + + $ctrl.openSurvey = function() { + window.open("https://docker.qualtrics.com/jfe/form/SV_267blbhIjjf3Mma", "_blank"); + } + + }, + }) .service('TerminalService', ['$window', '$rootScope', function($window, $rootScope) { var fullscreen; var fontSize = getFontSize(); diff --git a/handlers/www/default/index.html b/handlers/www/default/index.html index 2669723..234beb2 100644 --- a/handlers/www/default/index.html +++ b/handlers/www/default/index.html @@ -59,17 +59,18 @@ {{newInstanceBtnText}} - - - - - + + + + + {{instance.ip}} {{instance.hostname}} - - - - + + + + + @@ -227,6 +228,20 @@ +