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

Release 0.73.2 #13086

Merged
merged 2 commits into from
Jan 7, 2019
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
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7

ENV RC_VERSION 0.73.1
ENV RC_VERSION 0.73.2

MAINTAINER buildmaster@rocket.chat

Expand Down
24 changes: 24 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -24507,6 +24507,30 @@
]
}
]
},
"0.73.2": {
"node_version": "8.11.4",
"npm_version": "6.4.1",
"mongo_versions": [
"3.2",
"3.4",
"3.6",
"4.0"
],
"pull_requests": [
{
"pr": "13013",
"title": "[NEW] Cloud Integration",
"userLogin": "graywolf336",
"milestone": "0.73.2",
"contributors": [
"graywolf336",
"geekgonecrazy",
"web-flow",
"sampaiodiego"
]
}
]
}
}
}
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ rocketchat:bot-helpers
rocketchat:cas
rocketchat:channel-settings
rocketchat:channel-settings-mail-messages
rocketchat:cloud
rocketchat:colors
rocketchat:crowd
rocketchat:custom-oauth
Expand Down
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ rocketchat:bot-helpers@0.0.1
rocketchat:cas@1.0.0
rocketchat:channel-settings@0.0.1
rocketchat:channel-settings-mail-messages@0.0.1
rocketchat:cloud@0.0.1
rocketchat:colors@0.0.1
rocketchat:cors@0.0.1
rocketchat:crowd@1.0.0
Expand Down
4 changes: 2 additions & 2 deletions .sandstorm/sandstorm-pkgdef.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (

appTitle = (defaultText = "Rocket.Chat"),

appVersion = 122, # Increment this for every release.
appVersion = 123, # Increment this for every release.

appMarketingVersion = (defaultText = "0.73.1"),
appMarketingVersion = (defaultText = "0.73.2"),
# Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing.

Expand Down
2 changes: 1 addition & 1 deletion .travis/snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then
RC_VERSION=$TRAVIS_TAG
else
CHANNEL=edge
RC_VERSION=0.73.1
RC_VERSION=0.73.2
fi

echo "Preparing to trigger a snap release for $CHANNEL channel"
Expand Down
18 changes: 18 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@

# 0.73.2
`2019-01-07 · 1 🎉 · 3 👩‍💻👨‍💻`

### Engine versions
- Node: `8.11.4`
- NPM: `6.4.1`
- MongoDB: `3.2, 3.4, 3.6, 4.0`

### 🎉 New features

- Cloud Integration ([#13013](https://github.com/RocketChat/Rocket.Chat/pull/13013))

### 👩‍💻👨‍💻 Core Team 🤓

- [@geekgonecrazy](https://github.com/geekgonecrazy)
- [@graywolf336](https://github.com/graywolf336)
- [@sampaiodiego](https://github.com/sampaiodiego)

# 0.73.1
`2018-12-28 · 1 🐛 · 2 🔍 · 2 👩‍💻👨‍💻`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "0.73.1",
"version": "0.73.2",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down
16 changes: 16 additions & 0 deletions packages/rocketchat-cloud/client/admin/callback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template name="cloudCallback">
<div class="main-content-flex">
<section class="page-container page-home page-static page-settings">
{{> header sectionName="Cloud_connect"}}
<div class="content">
{{#requiresPermission 'manage-cloud'}}
{{#if callbackError.error}}
<p>{{_ "Cloud_error_in_authenticating"}}</p>

<p>{{_ "Cloud_error_code"}} {{ callbackError.errorCode }}</p>
{{/if}}
{{/requiresPermission}}
</div>
</section>
</div>
</template>
37 changes: 37 additions & 0 deletions packages/rocketchat-cloud/client/admin/callback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import './callback.html';

import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';

import { FlowRouter } from 'meteor/kadira:flow-router';

import queryString from 'query-string';

Template.cloudCallback.onCreated(function() {
const instance = this;

instance.loading = new ReactiveVar(true);
instance.callbackError = new ReactiveVar({ error: false });

const params = queryString.parse(location.search);

if (params.error_code) {
instance.callbackError.set({ error: true, errorCode: params.error_code });
} else {
Meteor.call('cloud:finishOAuthAuthorization', params.code, params.state, (error) => {
if (error) {
console.warn('cloud:finishOAuthAuthorization', error);
return;
}

FlowRouter.go('/admin/cloud');
});
}
});

Template.cloudCallback.helpers({
callbackError() {
return Template.instance().callbackError.get();
},
});
83 changes: 83 additions & 0 deletions packages/rocketchat-cloud/client/admin/cloud.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<template name="cloud">
<div class="main-content-flex">
<section class="page-container page-home page-static page-settings">
{{> header sectionName="Cloud_connect"}}
<div class="content">
{{#requiresPermission 'manage-cloud'}}
<div class="section">
<div class="section-title">
<div class="section-title-text">
{{_ "Cloud_what_is_it"}}
</div>
</div>

<div class="section-content">
<p>{{_ "Cloud_what_is_it_description"}}</p>
</div>
</div>
<div class="section">
{{#if info.registeredWithWizard}}
{{#if info.workspaceConnected}}
<div class="section-content border-component-color">
{{#if info.userAssociated}}
<p>{{_ "Cloud_workspace_connected_plus_account"}}</p>
{{else}}
<p>{{_ "Cloud_workspace_connected_without_account"}}</p>
<div class="input-line double-col">
<label class="setting-label" title=""></label>
<div class="setting-field">
<button type="button" class="rc-button rc-button--primary action login-btn">{{_ "Cloud_login_to_cloud"}}</button>
</div>
</div>
{{/if}}
</div>
{{else}}
<div class="section-content border-component-color">
<div class="input-line double-col">
<label class="setting-label" title="cloudEmail">Email</label>
<div class="setting-field">
<input class="input-monitor rc-input__element" type="text" name="cloudEmail" value="{{ info.email }}">
<div class="settings-description secondary-font-color">{{_ "Cloud_address_to_send_registration_to"}}</div>
</div>
</div>
<div class="input-line double-col">
<label class="setting-label" title=""></label>
<div class="setting-field">
<button type="button" class="rc-button rc-button--primary action update-email-btn">{{_ "Cloud_update_email"}}</button>
</div>
</div>

<pre>{{ registeredWithWizard }}</pre>

<div class="input-line double-col">
<label class="setting-label" title="cloudToken">{{_ "Token"}}</label>
<div class="setting-field">
<input class="input-monitor rc-input__element" type="text" name="cloudToken" value="{{ info.token }}">
<div class="settings-description secondary-font-color">{{_ "Cloud_manually_input_token"}}</div>
</div>
</div>
<div class="input-line double-col">
<label class="setting-label" title=""></label>
<div class="setting-field">
<button type="button" class="rc-button rc-button--primary action connect-btn">{{_ "Connect"}}</button>
</div>
</div>
</div>
{{/if}}
{{else}}
<div class="section-title">
<div class="section-title-text">
{{_ "Cloud_registration_required"}}
</div>
</div>
<div class="section-content border-component-color">
<p>{{_ "Cloud_registration_required_description"}}</p>
<p><a href="./admin/Setup_Wizard">{{_ "Cloud_registration_requried_link_text"}}</a></p>
</div>
{{/if}}
</div>
{{/requiresPermission}}
</div>
</section>
</div>
</template>
93 changes: 93 additions & 0 deletions packages/rocketchat-cloud/client/admin/cloud.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import './cloud.html';

import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { t } from 'meteor/rocketchat:utils';

import queryString from 'query-string';
import toastr from 'toastr';

Template.cloud.onCreated(function() {
const instance = this;
instance.info = new ReactiveVar();
instance.loading = new ReactiveVar(true);

instance.loadRegStatus = function _loadRegStatus() {
Meteor.call('cloud:checkRegisterStatus', (error, info) => {
if (error) {
console.warn('cloud:checkRegisterStatus', error);
return;
}

instance.info.set(info);
instance.loading.set(false);
});
};

instance.connectWorkspace = function _connectWorkspace(token) {
Meteor.call('cloud:connectWorkspace', token, (error, success) => {
if (error) {
toastr.error(error);
instance.loadRegStatus();
return;
}

if (!success) {
toastr.error('Invalid token');
instance.loadRegStatus();
return;
}

toastr.success(t('Connected'));

instance.loadRegStatus();
});
};

const params = queryString.parse(location.search);

if (params.token) {
instance.connectWorkspace();
} else {
instance.loadRegStatus();
}
});

Template.cloud.helpers({
info() {
return Template.instance().info.get();
},
});

Template.cloud.events({
'click .update-email-btn'() {
const val = $('input[name=cloudEmail]').val();

Meteor.call('cloud:updateEmail', val, (error) => {
if (error) {
console.warn(error);
return;
}

toastr.success(t('Saved'));
});
},

'click .login-btn'() {
Meteor.call('cloud:getOAuthAuthorizationUrl', (error, url) => {
if (error) {
console.warn(error);
return;
}

window.location.href = url;
});
},

'click .connect-btn'(e, i) {
const token = $('input[name=cloudToken]').val();

i.connectWorkspace(token);
},
});
28 changes: 28 additions & 0 deletions packages/rocketchat-cloud/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import './admin/callback';
import './admin/cloud';

import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { FlowRouter } from 'meteor/kadira:flow-router';

FlowRouter.route('/admin/cloud', {
name: 'cloud-config',
action() {
BlazeLayout.render('main', { center: 'cloud', old: true });
},
});

FlowRouter.route('/admin/cloud/oauth-callback', {
name: 'cloud-oauth-callback',
action() {
BlazeLayout.render('main', { center: 'cloudCallback', old: true });
},
});

RocketChat.AdminBox.addOption({
icon: 'cloud-plus',
href: 'admin/cloud',
i18nLabel: 'Cloud',
permissionGranted() {
return RocketChat.authz.hasAtLeastOnePermission(['manage-cloud']);
},
});
17 changes: 17 additions & 0 deletions packages/rocketchat-cloud/package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Package.describe({
name: 'rocketchat:cloud',
version: '0.0.1',
summary: 'Package which interacts with the Rocket.Chat Cloud offerings.',
git: '',
});

Package.onUse(function(api) {
api.use([
'ecmascript',
'rocketchat:lib',
'templating',
]);

api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});
Loading