Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into jalik-ufs
Browse files Browse the repository at this point in the history
# Conflicts:
#	.meteor/packages
  • Loading branch information
rodrigok committed Aug 21, 2015
2 parents 1b7f93e + 532ed7a commit e110404
Show file tree
Hide file tree
Showing 62 changed files with 790 additions and 93 deletions.
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ rocketchat:colors
raix:push@2.6.13-rc.1
jalik:ufs
jalik:ufs-gridfs
monbro:mongodb-mapreduce-aggregation
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ mizzao:autocomplete@0.5.1
mizzao:timesync@0.3.3
mobile-status-bar@1.0.3
momentjs:moment@2.10.6
monbro:mongodb-mapreduce-aggregation@1.0.1
mongo@1.1.0
mongo-livedata@1.0.8
mrt:reactive-store@0.0.1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ It is a great solution for communities and companies wanting to privately host t
- Remote Locations Video Monitoring - [Early access ...](https://github.com/RocketChat/Rocket.Chat/wiki/Remote-Video-Monitoring)
- Native Cross-Platform Desktop Application [Rocket.Chat.Electron - HELP WANTED](https://github.com/RocketChat/Rocket.Chat.Electron/releases)
- Mobile app for iPhone, iPad, and iPod touch [Available now! - help us test](https://github.com/RocketChat/Rocket.Chat/wiki/Mobile-app-for-iPhones,-iPads,-iPod-Touch)
- Mobile app for Android phone, tablet, and TV stick [Install now! - help us test](https://github.com/RocketChat/Rocket.Chat/wiki/Mobile-app-for-Android-phone,-tablet,-set-top-box,-and-TV-stick)
- Mobile app for Android phone, tablet, and TV stick [Install now!](https://play.google.com/store/apps/details?id=com.konecty.rocket.chat)

### Roadmap

#### In Progress

- Native iOS Application [Rocket.Chat.iOS - HELP WANTED](https://github.com/RocketChat/Rocket.Chat.iOS)
- Native Android Application [Issue #271 - HELP WANTED](https://github.com/RocketChat/Rocket.Chat/issues/271)
- External popout window for chat with website visitor (like Zopim, Olark, LiveChat, SnapEngage)
- External popout window for chat with website visitor, like Zopim, Olark, LiveChat, SnapEngage [Issue #519](https://github.com/RocketChat/Rocket.Chat/issues/519)

#### Planned

Expand Down
Empty file modified build-android.sh
100644 → 100755
Empty file.
Empty file modified build-ios.sh
100644 → 100755
Empty file.
Empty file modified build.sh
100644 → 100755
Empty file.
22 changes: 22 additions & 0 deletions client/routes/router.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,42 @@ FlowRouter.route '/home',
BlazeLayout.render 'main', {center: 'home'}
KonchatNotification.getDesktopPermission()


FlowRouter.route '/changeavatar',
name: 'changeAvatar'

action: ->
BlazeLayout.render 'main', {center: 'avatarPrompt'}


FlowRouter.route '/admin/users',
name: 'admin-users'

action: ->
BlazeLayout.render 'main', {center: 'adminUsers'}


FlowRouter.route '/admin/rooms',
name: 'admin-rooms'

action: ->
BlazeLayout.render 'main', {center: 'adminRooms'}


FlowRouter.route '/admin/statistics',
name: 'admin-statistics'

action: ->
BlazeLayout.render 'main', {center: 'adminStatistics'}


FlowRouter.route '/admin/:group?',
name: 'admin'

action: ->
BlazeLayout.render 'main', {center: 'admin'}


FlowRouter.route '/account/:group?',
name: 'account'

Expand All @@ -72,6 +78,7 @@ FlowRouter.route '/account/:group?',
params.group = _.capitalize params.group, true
BlazeLayout.render 'main', { center: "account#{params.group}" }


FlowRouter.route '/history/private',
name: 'privateHistory'

Expand All @@ -81,3 +88,18 @@ FlowRouter.route '/history/private',
action: ->
Session.setDefault('historyFilter', '')
BlazeLayout.render 'main', {center: 'privateHistory'}


FlowRouter.route '/terms-of-service',
name: 'terms-of-service'

action: ->
Session.set 'cmsPage', 'Layout_Terms_of_Service'
BlazeLayout.render 'cmsPage'

FlowRouter.route '/privacy-policy',
name: 'privacy-policy'

action: ->
Session.set 'cmsPage', 'Layout_Privacy_Policy'
BlazeLayout.render 'cmsPage'
103 changes: 103 additions & 0 deletions client/stylesheets/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ blockquote {
}
}

.login-terms {
max-width: 400px;
color: #C2E7FF;
margin: auto;

a {
font-weight: bold !important;
text-decoration: underline;
color: #C2E7FF;

&:hover {
color: white;
}
}
}

.upload-preview {
background-color: #f5f5f5;
.upload-preview-file {
Expand Down Expand Up @@ -642,6 +658,10 @@ label.required:after {
&.meteor-developer {
background-color: #de4f4f;
}
&.button-block {
display: block;
width: 100%;
}
}

.sec-header {
Expand Down Expand Up @@ -1711,6 +1731,16 @@ a.github-fork {
}
}

.cms-page {
max-width: 800px;
margin: 40px auto;
color: #444;
background-color: white;
padding: 20px;
border-radius: 5px;
box-shadow: 1px 1px 4px rgba(0,0,0,.3);
}

.spotlight {
background-color: rgba(0,0,0,.3);
position: fixed;
Expand Down Expand Up @@ -1752,6 +1782,35 @@ a.github-fork {
}
}

.mobile-message-menu {
background-color: rgba(0,0,0,.3);
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
justify-content: center;
padding: 0 40px;

> .buttons {
font-size: 24px;
position: absolute;
bottom: 0;
left: 10%;
right: 10%;

.button {
display: block;
text-align: center;
}
}

.mobile-menu-separator {
height: 10px;
}
}

// MAIN CONTENT + MAIN PAGES //
.main-content {
position: fixed;
Expand Down Expand Up @@ -2753,6 +2812,23 @@ a.github-fork {
}
}
}
.edit-form {
white-space: normal;
h3 {
font-size: 24px;
margin-bottom: 8px;
line-height: 22px;
}
p {
line-height: 18px;
font-size: 12px;
font-weight: 300;
color: @secondary-font-color;
}
> .input-line {
margin-top: 20px;
}
}
}

.user-image-status(@color) {
Expand Down Expand Up @@ -3438,6 +3514,15 @@ a.github-fork {
}
}

.statistics-table {
border: 1px solid black;
th, td {
border: 1px solid black;
text-align: left;
padding: 3px 10px;
}
}

.rocket-team {
display: block;
li {
Expand Down Expand Up @@ -3605,3 +3690,21 @@ a.github-fork {
padding-right: 10px;
}
}

@media all and(max-height: 480px) {
#login-card {
padding: 10px;
margin: 10px auto;

.input-text {
margin-bottom: 6px;
}

.submit {
margin: 0px;
}
}
.social-login {
margin-bottom: 10px;
}
}
38 changes: 37 additions & 1 deletion client/views/admin/adminStatistics.coffee
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@
Template.adminStatistics.helpers
isAdmin: ->
return Meteor.user().admin is true
isReady: ->
return Template.instance().ready.get()
statistics: ->
return Template.instance().statistics.get()
inGB: (size) ->
if size > 1073741824
return _.numberFormat(size / 1024 / 1024 / 1024, 2) + ' GB'
return _.numberFormat(size / 1024 / 1024, 2) + ' MB'
humanReadable: (time) ->
days = Math.floor time / 86400
hours = Math.floor (time % 86400) / 3600
minutes = Math.floor ((time % 86400) % 3600) / 60
seconds = ((time % 86400) % 3600) % 60
out = ""
if days > 0
out += "#{days} #{TAPi18next.t 'project:days'}, "
if hours > 0
out += "#{hours} #{TAPi18next.t 'project:hours'}, "
if minutes > 0
out += "#{minutes} #{TAPi18next.t 'project:minutes'}, "
if seconds > 0
out += "#{seconds} #{TAPi18next.t 'project:seconds'}"
return out
numFormat: (number) ->
return _.numberFormat(number, 2)

Template.adminUsers.onRendered ->
Template.adminStatistics.onRendered ->
Tracker.afterFlush ->
SideNav.setFlex "adminFlex"
SideNav.openFlex()

Template.adminStatistics.onCreated ->
instance = @
@statistics = new ReactiveVar {}
@ready = new ReactiveVar false

Meteor.call 'generateStatistics', (error, statistics) ->
instance.ready.set true
if error
toastr.error error.reason
else
instance.statistics.set statistics
91 changes: 90 additions & 1 deletion client/views/admin/adminStatistics.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,96 @@ <h2>
{{#unless isAdmin}}
<p>You are not authorized to view this page.</p>
{{else}}

{{#if isReady}}
<table class="statistics-table">
<tr>
<th>{{_ "Stats_Total_Users"}}</th>
<td>{{statistics.totalUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_Active_Users"}}</th>
<td>{{statistics.activeUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_Non_Active_Users"}}</th>
<td>{{statistics.nonActiveUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_Online_Users"}}</th>
<td>{{statistics.onlineUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_Offline_Users"}}</th>
<td>{{statistics.offlineUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_Total_Rooms"}}</th>
<td>{{statistics.totalRooms}}</td>
</tr>
<tr>
<th>{{_ "Stats_Total_Channels"}}</th>
<td>{{statistics.totalChannels}}</td>
</tr>
<tr>
<th>{{_ "Stats_Total_Private_Groups"}}</th>
<td>{{statistics.totalPrivateGroups}}</td>
</tr>
<tr>
<th>{{_ "Stats_Total_Direct_Messages"}}</th>
<td>{{statistics.totalDirect}}</td>
</tr>
<tr>
<th>{{_ "Stats_Max_Room_Users"}}</th>
<td>{{statistics.maxRoomUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_Avg_Channel_Users"}}</th>
<td>{{numFormat statistics.avgChannelUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_Avg_Private_Group_Users"}}</th>
<td>{{numFormat statistics.avgPrivateGroupUsers}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Type"}}</th>
<td>{{statistics.os.type}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Platform"}}</th>
<td>{{statistics.os.platform}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Arch"}}</th>
<td>{{statistics.os.arch}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Release"}}</th>
<td>{{statistics.os.release}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Uptime"}}</th>
<td>{{humanReadable statistics.os.uptime}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Loadavg"}}</th>
<td>{{numFormat statistics.os.loadavg.[0]}}, {{numFormat statistics.os.loadavg.[1]}}, {{numFormat statistics.os.loadavg.[2]}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Totalmem"}}</th>
<td>{{inGB statistics.os.totalmem}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Freemem"}}</th>
<td>{{inGB statistics.os.freemem}}</td>
</tr>
<tr>
<th>{{_ "Stats_OS_Cpus"}}</th>
<td>{{statistics.os.cpus.length}}</td>
</tr>
</table>
{{else}}
{{_ "Please_wait_statistics"}}
{{/if}}
{{/unless}}
</div>
</section>
Expand Down
Loading

0 comments on commit e110404

Please sign in to comment.