Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into ui-account-to-js
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler committed May 12, 2017
2 parents a1d215b + 079b7ff commit cc14a79
Show file tree
Hide file tree
Showing 14 changed files with 1,144 additions and 874 deletions.
28 changes: 18 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,24 @@ before_deploy:
- ".travis/namefiles.sh"
- echo ".travis/sandstorm.sh"
deploy:
provider: s3
access_key_id: AKIAIKIA7H7D47KUHYCA
secret_access_key: "$ACCESSKEY"
bucket: download.rocket.chat
skip_cleanup: true
upload_dir: build
local_dir: "$ROCKET_DEPLOY_DIR"
on:
condition: "$TRAVIS_PULL_REQUEST=false"
all_branches: true
- provider: s3
access_key_id: AKIAIKIA7H7D47KUHYCA
secret_access_key: "$ACCESSKEY"
bucket: download.rocket.chat
skip_cleanup: true
upload_dir: build
local_dir: "$ROCKET_DEPLOY_DIR"
on:
condition: "$TRAVIS_PULL_REQUEST=false"
all_branches: true
- provider: releases
api-key: "$GITHUB_TOKEN"
file_glob: true
file: build/*
skip_cleanup: true
on:
tags: true

after_deploy:
- ".travis/docker.sh"
- ".travis/update-releases.sh"
Expand Down
7 changes: 6 additions & 1 deletion packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
"BotHelpers_userFields": "User Fields",
"BotHelpers_userFields_Description": "CSV of user fields that can be accessed by bots helper methods.",
"Branch": "Branch",
"Broadcast_Connected_Instances": "Broadcast Connected Instances",
"Bugsnag_api_key": "Bugsnag API Key",
"busy": "busy",
"Busy": "Busy",
Expand Down Expand Up @@ -362,6 +363,7 @@
"CROWD_Reject_Unauthorized": "Reject Unauthorized",
"CRM_Integration": "CRM Integration",
"Current_Chats": "Current Chats",
"Current_Status": "Current Status",
"Custom": "Custom",
"Custom_Emoji": "Custom Emoji",
"Custom_Emoji_Add": "Add New Emoji",
Expand Down Expand Up @@ -706,6 +708,7 @@
"Install_FxOs_follow_instructions": "Please confirm the app installation on your device (press \"Install\" when prompted).",
"Installation": "Installation",
"Installed_at": "Installed at",
"Instance_Record": "Instance Record",
"Instructions_to_your_visitor_fill_the_form_to_send_a_message": "Instructions to your visitor fill the form to send a message",
"Impersonate_user": "Impersonate User",
"Impersonate_user_description": "When enabled, integration posts as the user that triggered integration",
Expand Down Expand Up @@ -1256,6 +1259,7 @@
"Reset_password": "Reset password",
"Restart": "Restart",
"Restart_the_server": "Restart the server",
"Retry_Count": "Retry Count",
"Role": "Role",
"Role_Editing": "Role Editing",
"Role_removed": "Role removed",
Expand Down Expand Up @@ -1560,6 +1564,7 @@
"Unread_Rooms": "Unread Rooms",
"Unread_Rooms_Mode": "Unread Rooms Mode",
"Unstar_Message": "Remove Star",
"Updated_at": "Updated at",
"Upload_file_description": "File description",
"Upload_file_name": "File name",
"Upload_file_question": "Upload file?",
Expand Down Expand Up @@ -1719,4 +1724,4 @@
"your_message_optional": "your message (optional)",
"Your_password_is_wrong": "Your password is wrong!",
"Your_push_was_sent_to_s_devices": "Your push was sent to %s devices"
}
}
11 changes: 10 additions & 1 deletion packages/rocketchat-ui-admin/client/adminInfo.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Template.adminInfo.helpers
return Template.instance().ready.get()
statistics: ->
return Template.instance().statistics.get()
instances: ->
return Template.instance().instances.get()
inGB: (size) ->
if size > 1073741824
return _.numberFormat(size / 1024 / 1024 / 1024, 2) + ' GB'
Expand Down Expand Up @@ -52,13 +54,20 @@ Template.adminInfo.onRendered ->
Template.adminInfo.onCreated ->
instance = @
@statistics = new ReactiveVar {}
@instances = new ReactiveVar []
@ready = new ReactiveVar false

if RocketChat.authz.hasAllPermission('view-statistics')
Meteor.call 'getStatistics', (error, statistics) ->
instance.ready.set true
if error
handleError(error)
else
instance.statistics.set statistics

Meteor.call 'instances/get', (error, instances) ->
instance.ready.set true
if error
handleError(error)
else
instance.instances.set instances

44 changes: 44 additions & 0 deletions packages/rocketchat-ui-admin/client/adminInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,50 @@ <h3>{{_ "Usage"}}</h3>
</tr>
</table>

{{#if instances}}
<h3>{{_ "Broadcast_Connected_Instances"}}</h3>
{{#each instances}}
<table class="statistics-table secondary-background-color">
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Address"}}</th>
<td class="border-component-color">{{address}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Auth"}}</th>
<td class="border-component-color">{{broadcastAuth}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Current_Status"}} > {{_ "Connected"}}</th>
<td class="border-component-color">{{currentStatus.connected}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Current_Status"}} > {{_ "Retry_Count"}}</th>
<td class="border-component-color">{{currentStatus.retryCount}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Current_Status"}} > {{_ "Status"}}</th>
<td class="border-component-color">{{currentStatus.status}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Instance_Record"}} > {{_ "ID"}}</th>
<td class="border-component-color">{{instanceRecord._id}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Instance_Record"}} > {{_ "PID"}}</th>
<td class="border-component-color">{{instanceRecord.pid}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Instance_Record"}} > {{_ "Created_at"}}</th>
<td class="border-component-color">{{formatDate instanceRecord._createdAt}}</td>
</tr>
<tr class="admin-table-row">
<th class="content-background-color border-component-color">{{_ "Instance_Record"}} > {{_ "Updated_at"}}</th>
<td class="border-component-color">{{formatDate instanceRecord._updatedAt}}</td>
</tr>
</table>
{{/each}}
{{/if}}

<button type="button" class="button primary refresh">Refresh</button>
{{else}}
{{_ "Loading..."}}
Expand Down
2 changes: 2 additions & 0 deletions packages/rocketchat-ui/client/lib/fileUpload.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ getUploadPreview = (file, callback) ->
# If greater then 10MB don't try and show a preview
if file.file.size > 10 * 1000000
callback(file, null)
else if not file.file.type?
callback(file, null)
else
if file.file.type.indexOf('audio') > -1 or file.file.type.indexOf('video') > -1 or file.file.type.indexOf('image') > -1
file.type = file.file.type.split('/')[0]
Expand Down
Loading

0 comments on commit cc14a79

Please sign in to comment.