@@ -39,4 +38,14 @@ const FlagWidget = (props) => {
);
};
+FlagWidget.propTypes = {
+ assets: PropTypes.arrayOf(PropTypes.shape({
+ id: PropTypes.string,
+ url: PropTypes.string,
+ action_summaries: PropTypes.array,
+ author: PropTypes.string,
+ created_at: PropTypes.string
+ })).isRequired
+};
+
export default FlagWidget;
diff --git a/client/coral-admin/src/containers/Dashboard/LikeWidget.js b/client/coral-admin/src/containers/Dashboard/LikeWidget.js
index 436fbcaf3..b878c281b 100644
--- a/client/coral-admin/src/containers/Dashboard/LikeWidget.js
+++ b/client/coral-admin/src/containers/Dashboard/LikeWidget.js
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, {PropTypes} from 'react';
import {Link} from 'react-router';
import styles from './Widget.css';
import I18n from 'coral-framework/modules/i18n/i18n';
@@ -6,9 +6,7 @@ import translations from 'coral-admin/src/translations';
const lang = new I18n(translations);
-const LikeWidget = (props) => {
-
- const {assets} = props;
+const LikeWidget = ({assets}) => {
return (
@@ -40,4 +38,14 @@ const LikeWidget = (props) => {
);
};
+LikeWidget.propTypes = {
+ assets: PropTypes.arrayOf(PropTypes.shape({
+ id: PropTypes.string,
+ url: PropTypes.string,
+ action_summaries: PropTypes.array,
+ author: PropTypes.string,
+ created_at: PropTypes.string
+ })).isRequired
+};
+
export default LikeWidget;
diff --git a/client/coral-admin/src/containers/Dashboard/Widget.css b/client/coral-admin/src/containers/Dashboard/Widget.css
index 401cd1fe7..587c51ada 100644
--- a/client/coral-admin/src/containers/Dashboard/Widget.css
+++ b/client/coral-admin/src/containers/Dashboard/Widget.css
@@ -19,7 +19,6 @@
padding-left: 10px;
font-size: 1.5rem;
font-weight: bold;
- background-color: #e0e0e0;
}
.widgetTable {
diff --git a/client/coral-admin/src/graphql/fragments/assetMetricsView.graphql b/client/coral-admin/src/graphql/fragments/assetMetricsView.graphql
index 37335aeaa..c77fbc32b 100644
--- a/client/coral-admin/src/graphql/fragments/assetMetricsView.graphql
+++ b/client/coral-admin/src/graphql/fragments/assetMetricsView.graphql
@@ -4,6 +4,7 @@ fragment metrics on Asset {
url
author
created_at
+ commentCount
action_summaries {
type: __typename
actionCount
diff --git a/client/coral-admin/src/graphql/queries/metricsQuery.graphql b/client/coral-admin/src/graphql/queries/metricsQuery.graphql
index 42a9fb70e..f0dff8965 100644
--- a/client/coral-admin/src/graphql/queries/metricsQuery.graphql
+++ b/client/coral-admin/src/graphql/queries/metricsQuery.graphql
@@ -7,4 +7,7 @@ query Metrics ($from: Date!, $to: Date!) {
assetsByLike: assetMetrics(from: $from, to: $to, sort: LIKE) {
...metrics
}
+ assetsByActivity: assetMetrics(from: $from, to: $to, sort: ACTIVITY) {
+ ...metrics
+ }
}
diff --git a/client/coral-admin/src/translations.json b/client/coral-admin/src/translations.json
index ff111ea1b..8a8c0ee14 100644
--- a/client/coral-admin/src/translations.json
+++ b/client/coral-admin/src/translations.json
@@ -123,6 +123,7 @@
"no_flags": "There have been no flags in the last 5 minutes! Hooray!",
"no_likes": "There have been no likes in the last 5 minutes. All quiet.",
"flags": "Flags",
+ "no_activity": "There haven't been any comments anywhere in the last five minutes.",
"comment_count": "comments"
},
"streams": {
@@ -244,6 +245,7 @@
"no_flags": "¡Nadie ha marcado nada en los últimos 5 minutos! ¡Bravo!",
"no_likes": "A nadie le ha gustado algún comentario en los últimos 5 minutos. Todo tranquilo.",
"flags": "Marcados",
+ "no_activity": "No hubo comentarios en los ultimos 5 minutos",
"comment_count": "comentarios"
},
"streams": {
diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js
index 0a3cdb78b..20060f474 100644
--- a/client/coral-embed-stream/src/Comment.js
+++ b/client/coral-embed-stream/src/Comment.js
@@ -157,31 +157,31 @@ class Comment extends React.Component {
-
-
-
-
- setActiveReplyBox(comment.id)}
- parentCommentId={parentId || comment.id}
- currentUserId={currentUser && currentUser.id}
- banned={false} />
-
-
-
-
-
-
-
+
+
+
+
+ setActiveReplyBox(comment.id)}
+ parentCommentId={parentId || comment.id}
+ currentUserId={currentUser && currentUser.id}
+ banned={false} />
+
+
+
+
+
+
+