Skip to content

Commit

Permalink
Merge pull request #2 from RocketChat/develop
Browse files Browse the repository at this point in the history
Merge commit
  • Loading branch information
gsunit authored Apr 1, 2019
2 parents 39f8e6d + 4d15868 commit 3beaa65
Show file tree
Hide file tree
Showing 419 changed files with 3,458 additions and 3,407 deletions.
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ test-install-dependencies: &test-install-dependencies
command: |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64 ] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org-shell google-chrome-stable
Expand All @@ -34,7 +34,7 @@ test-configure-replicaset: &test-configure-replicaset
mongo --eval 'rs.status()'
test-docker-image: &test-docker-image
circleci/node:8.11-browsers
circleci/node:8.11-stretch-browsers

test: &test
<<: *defaults
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
build:
<<: *defaults
docker:
- image: circleci/node:8.11
- image: circleci/node:8.11-stretch

steps:
- checkout
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
deploy:
<<: *defaults
docker:
- image: circleci/node:8.11
- image: circleci/node:8.11-stretch

steps:
- attach_workspace:
Expand All @@ -269,9 +269,9 @@ jobs:
if [[ $CIRCLE_PULL_REQUESTS ]]; then exit 0; fi;
sudo apt-get -y -qq update
sudo apt-get -y -qq install python3.4-dev
sudo apt-get -y -qq install python3.5-dev
curl -O https://bootstrap.pypa.io/get-pip.py
python3.4 get-pip.py --user
python3.5 get-pip.py --user
export PATH=~/.local/bin:$PATH
pip install awscli --upgrade --user
Expand Down
4 changes: 2 additions & 2 deletions .docker-mongo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ADD entrypoint.sh /app/bundle/
MAINTAINER buildmaster@rocket.chat

RUN set -x \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list \
&& apt-get update \
&& apt-get install -y --force-yes pwgen mongodb-org \
&& echo "mongodb-org hold" | dpkg --set-selections \
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,5 @@ Rocket.Chat will be free forever, but you can help us speed up the development!

[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZL94ZE6LGVUSN)

[![Bitcoins](https://github.com/RocketChat/Rocket.Chat.Docs/blob/master/1.%20Contributing/Donating/coinbase.png?raw=true)](https://www.coinbase.com/checkouts/ac2fa967efca7f6fc1201d46bdccb875)


[BountySource](https://www.bountysource.com/teams/rocketchat)
8 changes: 0 additions & 8 deletions app/2fa/index.js

This file was deleted.

6 changes: 1 addition & 5 deletions app/accounts/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import { Meteor } from 'meteor/meteor';

if (Meteor.isServer) {
module.exports = require('./server/index.js');
}
export * from './server/index';
8 changes: 0 additions & 8 deletions app/analytics/index.js

This file was deleted.

6 changes: 1 addition & 5 deletions app/api/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import { Meteor } from 'meteor/meteor';

if (Meteor.isServer) {
module.exports = require('./server/index.js');
}
export * from './server/index';
77 changes: 71 additions & 6 deletions app/apps/assets/stylesheets/apps.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
}

.rc-apps-container {
margin-top: 0;
padding-bottom: 15px;
}

Expand All @@ -97,9 +98,20 @@
margin-top: 6px;
} */

.rc-header .rc-button {
min-height: 0;
margin: 0;
.content {
/* display: block !important; */
padding: 0 !important;

> .rc-apps-container {
display: block;
overflow-y: scroll;

padding: 0 !important;
}

> .rc-apps-details {
display: block;
}
}

.rc-apps-category {
Expand Down Expand Up @@ -143,26 +155,79 @@
}

.rc-table-info {
height: 40px;
margin: 0 7px;
}

.rc-app-price {
position: relative;
top: -3px;
}

.rc-table-td--medium {
width: 300px;
}

.rc-table td {
padding: 0.5rem 0;

padding-right: 10px;
}

td.rc-apps-marketplace-price {
text-align: right;

button {
font-weight: 600;
}

.rc-icon {
color: #3582f3;
}
}

th.rc-apps-marketplace-price {
width: 120px;
}

&__wrap-actions {
& > .rc-icon--loading {
& > .loading {
display: none;
}

&.loading {
& > .rc-icon--loading {
& > .loading {
display: block;

animation: spin 1s linear infinite;
font-size: 11px;
font-weight: 600;

& > .rc-icon--loading {
animation: spin 1s linear infinite;
}
}

& > .apps-installer {
display: none;
}
}
}

.arrow-up {
transform: rotate(180deg);
}

&.page-settings {
.section {
padding: 0 !important;

border-bottom: none !important;

&:hover {
background-color: var(--rc-color-primary-lightest);
}
}
}
}

@keyframes play90 {
Expand Down
51 changes: 18 additions & 33 deletions app/apps/client/admin/appLogs.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
<template name="appLogs">
{{#with app}}
<section class="page-container page-list page-settings flex-tab-main-content">
<header class="fixed-title">
{{> burger}}
<a href="{{pathFor "app-manage" appId=id}}" title="{{_ "Back_to_Manage_Apps"}}">
<i class="icon-left-open"></i>
</a> &nbsp;
<section class="page-container page-list page-settings flex-tab-main-content rc-apps-marketplace">
{{# header rawSectionName=title fixedHeight=true hideHelp=true fullpage=true}}
<div class="rc-header__block rc-header__block-action">
<button class="rc-button rc-button--primary js-refresh">
{{> icon icon="reload" block="rc-icon--default-size"}} {{_ "Refresh"}}
</button>
<button class="rc-button rc-button--nude js-cancel">{{> icon icon="cross"}}</button>

{{#if isReady}}
<h2>
<span class="room-title">{{_ "View_the_Logs_for" name=name}}</span>
</h2>
{{/if}}
</div>
{{/header}}
<div class="content">
{{#if hasError}}
<h2>
<span class="room-title">{{ theError }}</span>
</h2>
{{/if}}
</header>
<div class="content">
{{#if isReady}}
<div class="rocket-form">
{{#each log in logs}}
Expand All @@ -28,30 +25,18 @@ <h2>
{{formatDate log._createdAt}}: "{{log.method}}" ({{log.totalTime}}ms)
</div>
<div class="section-title-right">
<button class="button primary expand">
<span>{{_ "Expand"}}</span>
<button class="rc-button rc-button--nude button-down">
{{> icon icon="arrow-down" block="rc-icon--default-size"}}
</button>
</div>
</div>
<div class="section-content">
<h4>General Information</h4>
<ul>
<li>Method: {{ log.method }}</li>
<li>Start Time: {{ log.startTime }}</li>
<li>End Time: {{ log.endTime }}</li>
<li>Total Time: {{ log.totalTime }}ms</li>
<li>Log Entries: {{ log.entries.length }}</li>
</ul>

<h4>Log Entries</h4>
<ul>
{{#each entry in log.entries}}
<li>Timestamp: {{ entry.timestamp }}</li>
<li>Severity: {{ entry.severity }}</li>
<li>Caller: {{ entry.caller }}</li>
<li>Arguments: <pre><code class="code-colors hljs json">{{{ jsonStringify entry.args }}}</code></pre></li>
{{/each}}
</ul>
{{#each entry in log.entries}}
<div>{{ entry.severity }}: {{ entry.timestamp }} (Caller: {{ entry.caller }})</div>
<div>
<pre><code class="code-colors hljs json">{{{ jsonStringify entry.args }}}</code></pre>
</div>
{{/each}}
</div>
</div>
{{/each}}
Expand Down
55 changes: 35 additions & 20 deletions app/apps/client/admin/appLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,32 @@ import { APIClient } from '../../../utils';
import moment from 'moment';
import hljs from 'highlight.js';

Template.appLogs.onCreated(function() {
const instance = this;
this.id = new ReactiveVar(FlowRouter.getParam('appId'));
this.ready = new ReactiveVar(false);
this.hasError = new ReactiveVar(false);
this.theError = new ReactiveVar('');
this.app = new ReactiveVar({});
this.logs = new ReactiveVar([]);

const id = this.id.get();

const loadData = (instance) => {
Promise.all([
APIClient.get(`apps/${ id }`),
APIClient.get(`apps/${ id }/logs`),
APIClient.get(`apps/${ instance.id.get() }`),
APIClient.get(`apps/${ instance.id.get() }/logs`),
]).then((results) => {

instance.app.set(results[0].app);
instance.logs.set(results[1].logs);

this.ready.set(true);
instance.ready.set(true);
}).catch((e) => {
instance.hasError.set(true);
instance.theError.set(e.message);
});
};

Template.appLogs.onCreated(function() {
const instance = this;
this.id = new ReactiveVar(FlowRouter.getParam('appId'));
this.ready = new ReactiveVar(false);
this.hasError = new ReactiveVar(false);
this.theError = new ReactiveVar('');
this.app = new ReactiveVar({});
this.logs = new ReactiveVar([]);

loadData(instance);
});

Template.appLogs.helpers({
Expand Down Expand Up @@ -76,16 +78,29 @@ Template.appLogs.helpers({

return value.replace(/\\\\n/g, '<br>');
},
title() {
return TAPi18n.__('View_the_Logs_for', { name: Template.instance().app.get().name });
},
});

Template.appLogs.events({
'click .expand': (e) => {
$(e.currentTarget).closest('.section').removeClass('section-collapsed');
$(e.currentTarget).closest('button').removeClass('expand').addClass('collapse').find('span').text(TAPi18n.__('Collapse'));
'click .section-collapsed .section-title': (e) => {
$(e.currentTarget).closest('.section').removeClass('section-collapsed').addClass('section-expanded');
$(e.currentTarget).find('.button-down').addClass('arrow-up');
},

'click .section-expanded .section-title': (e) => {
$(e.currentTarget).closest('.section').removeClass('section-expanded').addClass('section-collapsed');
$(e.currentTarget).find('.button-down').removeClass('arrow-up');
},

'click .js-cancel': (e, t) => {
FlowRouter.go('app-manage', { appId: t.app.get().id }, { version: FlowRouter.getQueryParam('version') });
},

'click .collapse': (e) => {
$(e.currentTarget).closest('.section').addClass('section-collapsed');
$(e.currentTarget).closest('button').addClass('expand').removeClass('collapse').find('span').text(TAPi18n.__('Expand'));
'click .js-refresh': (e, t) => {
t.ready.set(false);
t.logs.set([]);
loadData(t);
},
});
Loading

0 comments on commit 3beaa65

Please sign in to comment.