Updates per feedback from @boaz

- Removed ability to close screen by clicking on modal background
- Change opt out link to toggle opt back in text
- Add close icon to the sample report
- Set opt in by default in marvelOpts
This commit is contained in:
Chris Cowan 2014-03-04 10:22:43 -07:00
parent 663d0baabb
commit 36e73c4a93
2 changed files with 8 additions and 5 deletions

View file

@ -41,13 +41,13 @@ function (angular, app, kbn, _) {
// setup the optIn and version values
var marvelOpts = storeFactory($scope, 'marvelOpts', {
report: void 0,
version: void 0,
report: true,
lastReport: void 0
});
$scope.init = function () {
$scope.kbnVersion = kbnVersion;
$scope.report = marvelOpts.report;
// If the user hasn't opted in or out, ask them to.
if(marvelOpts.version == null || marvelOpts.version !== kbnVersion) {
@ -137,6 +137,7 @@ function (angular, app, kbn, _) {
$scope.setOptIn = function(val) {
marvelOpts.version = kbnVersion;
marvelOpts.report = val;
$scope.report = val;
};
$scope.clearMarvelStorage = function() {
@ -149,6 +150,7 @@ function (angular, app, kbn, _) {
var panelModal = $modal({
template: './app/panels/marvel/cluster/optin.html',
persist: true,
backdrop: 'static',
show: false,
scope: $scope,
keyboard: false
@ -242,4 +244,4 @@ function (angular, app, kbn, _) {
});
});
});

View file

@ -4,12 +4,13 @@
…or talk to us about our <a href="http://www.elasticsearch.com/support/" target="_BLANK">annual support packages</a> that include Marvel for free.</p>
<p>
<a href="http://www.elasticsearch.com/marvel/" target="_BLANK" class="btn btn-success">Buy Marvel Now</a>
<a class="btn btn-success" ng-click="setOptIn(true);dismiss();">Continue Free Trial</a>
<a class="btn btn-success" ng-click="setOptIn(report);dismiss();">Continue Free Trial</a>
</p>
<p>Sharing your cluster statistics with us to help us improve. Totally anonymous and never shared with <br/>
anyone. Not ever. Curious what we see? <a ng-click="showSample=true">View report here</a>. Not interested? <a ng-click="setOptIn(false);dismiss();">Opt out here</a></p>
anyone. Not ever. Curious what we see? <a ng-click="showSample=true">View report here</a>. <span ng-show="report">Not interested? <a ng-click="setOptIn(false);">Opt out here</a></span><span ng-hide="report">Opted Out? <a ng-click="setOptIn(true);">Click here to opt back in.</a></span></p>
<div ng-show="showSample" style="text-align: left;">
<h5>Sample Statistics</h5>
<span class="close" ng-click="showSample=false" style="margin: 10px 10px; font-size: 30px;">&times;</span>
<pre>{{ data | json }}</pre>
</div>
</div>