Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create launchdock-connect plugin #1241

Merged
merged 5 commits into from
Aug 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ cfs:gridfs
cfs:standard-packages
cfs:storage-adapter
cfs:ui
jeremy:stripe
jparker:gravatar
juliancwirko:s-alert
juliancwirko:s-alert-stackslide
Expand Down
6 changes: 3 additions & 3 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ [email protected]
[email protected]
[email protected]
[email protected]
jeremy:[email protected]
jparker:[email protected]
jparker:[email protected]
jparker:[email protected]
[email protected]
juliancwirko:[email protected]
juliancwirko:s-alert@3.1.4
juliancwirko:s-alert@3.2.0
juliancwirko:[email protected]
kadira:[email protected]
kadira:[email protected]
Expand Down Expand Up @@ -117,9 +118,8 @@ [email protected]
mrt:[email protected]
[email protected]
[email protected]
[email protected]_4
[email protected]
oauth-encryption@1.1.13
oauth-encryption@1.2.0
[email protected]
[email protected]
[email protected]
Expand Down
9 changes: 9 additions & 0 deletions imports/plugins/included/launchdock-connect/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import "../lib/collections";

import "./templates/connect.html";
import "./templates/connect.js";
import "./templates/dashboard.html";
import "./templates/dashboard.less";
import "./templates/dashboard.js";
import "./templates/settings.html";
import "./templates/settings.js";
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<template name="connectDashboard">
{{> Template.dynamic template="dashboardHeader"}}
{{#if Template.subscriptionsReady}}
{{#if ldConnection}}
{{> launchdockDashboard}}
{{else}}
{{> reactionConnectDashboard}}
{{/if}}
{{/if}}
</template>

<template name="connectSettings">
{{#if Template.subscriptionsReady}}
{{#if ldConnection}}
{{> launchdockSettings}}
{{else}}
{{> reactionConnectSettings}}
{{/if}}
{{/if}}
</template>


<template name="reactionConnectDashboard">
<div class="container-fluid-sm">
<div class="row">

<div class="col-md-12">
<p>Reaction, Meteor, and MongoDB bundled for production and deployed as a stack of Docker containers in a scalable private cluster!</p>
<p><a href="https://github.com/reactioncommerce/launchdock" target="_blank">Launchdock</a> is a utility from the Reaction Core team, that manages this deployment.</p>
<ul class="reaction-connect-preview">
<li>Support for your custom SSL certificates</li>
<li>Support for your custom domains</li>
<li>Private scaling Application and DB cluster</li>
</ul>
<p><a href="https://reactioncommerce.com/" target="_blank">Go ahead, get connected with Reaction</a></p>
</div>

</div>
</div>

</template>


<template name="reactionConnectSettings">
<div class="container-fluid-sm">
<div class="row">
<div class="col-md-12">
<p>Looks like you are not connected yet.</p>
<p><a href="https://reactioncommerce.com/" target="_blank">Get a free trial of Reaction deployed as a service.</a></p>
</div>
</div>
</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Template } from "meteor/templating";
import Launchdock from "../../lib/launchdock";

/**
* Checks to see if we have a valid connection to ld,
* and currently assumes you don't have a launchdock account
* rather than being some kind of status indicator (really should be both)
*/

Template.connectDashboard.onCreated(function () {
this.subscribe("launchdock-auth");
});

Template.connectDashboard.helpers({
ldConnection() {
return Launchdock.connect();
}
});


Template.connectSettings.onCreated(function () {
this.subscribe("launchdock-auth");
});

Template.connectSettings.helpers({
ldConnection() {
return Launchdock.connect();
}
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@

<template name="launchdockDashboard">
{{#with packageData}}
<div class="container-fluid-sm connect-account">
<div class="row">
{{#if launchdockDataReady}}
<div class="col-md-6">
<div class="panel panel-default account-status">
<div class="panel-heading">
<h3>Account Status</h3>
</div>
<div class="panel-content">
{{#if isSubscribed}}
<div class="row">
<h4>Current Plan: </h4>
<p class="text-capitalize">{{plan}} Subscription</p>
</div>
<div class="row">
<h4>Next Payment Due: </h4>
<p>{{nextPayment}}</p>
</div>
{{else}}
<h4 class="trial-info">
Free trial ends: <span class="trial-ends-date">{{trial.ends}} ({{trial.daysRemaining}})</span>
</h4>
<p>
Select a payment period to activate your shop:
</p>
<div class="plan-choice">
<input type="radio" name="plan-choice" id="yearly-plan" value="Yearly" checked>
<label for="yearly-plan">
Annually <span class="price-breakdown">($45 x 12 months)</span>
MOST POPULAR <span class="most-popular">SAVE $60</span>
</label>
</div>
<div class="plan-choice">
<input type="radio" name="plan-choice" id="monthly-plan" value="Monthly">
<label for="monthly-plan">
Monthly <span class="price-breakdown">($50 each month)</span>
</label>
</div>
<div class="due-today">
<h4>Due: <span class="price">$540 for 12 months</span></h4>
</div>
<div class="terms">
<p>
By clicking Sign Up Now, you agree that to ensure uninterrupted service, your shop will be set to continuous auto-renewal payments of <span class="term">$540 for 12 months</span> with your next payment due on <span class="next-due">{{yearlyPaymentDate}}</span>. You can cancel your service or disable auto-renewal at any time by <a href="https://reactioncommerce.com/about#contact" target="_blank">contacting us</a>. You agree to our <a href="https://reactioncommerce.com/legal/terms" target="_blank">Terms of Service</a> and <a href="https://reactioncommerce.com/legal/privacy" target="_blank">Privacy Policy</a>.
</p>
</div>
<button class="checkout btn">
Sign Up Now!
</button>
{{/if}}
<hr>
</div>
</div>
</div>

<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3>SSL Settings</h3>
</div>
<div class="panel-content">
{{#if launchdockStack.defaultDomain}}
<h4>Default Domain Name</h4>
<p>
<a href="https://{{launchdockStack.defaultDomain}}">
https://{{launchdockStack.defaultDomain}}
</a>
</p>
<hr>
{{/if}}
<h4>Custom Domain Name</h4>
{{#if settings.ssl.domain}}
<p>
<a href="https://{{settings.ssl.domain}}">
https://{{settings.ssl.domain}}
</a>
</p>
<br>
{{else}}
<p>Custom SSL not configured yet.</p>
<br>
{{/if}}
{{#if launchdockStack.endpoint}}
<p><small>Create a CNAME record for your domain that points to:</small></p>
<br>
<p>{{launchdockStack.endpoint}}</p>
{{/if}}
</div>
<div class="panel-footer">
<div class="left"></div>
<div class="right">
<div class="panel-footer-item">
<button class="btn btn-default" data-event-action="showLaunchdockSettings">
<i class="fa fa-gear"></i>
</button>
</div>
</div>
</div>
</div>
</div>
{{else}}
<div class="connect-account loading">
<i class="fa fa-spinner fa-spin" id="btn-processing"></i>
</div>
{{/if}}
</div>
</div>
{{/with}}
</template>
Loading