@@ -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 9912ac4e4..b4515786f 100644
--- a/client/coral-admin/src/containers/Dashboard/Widget.css
+++ b/client/coral-admin/src/containers/Dashboard/Widget.css
@@ -23,7 +23,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 39bdba0e7..f0dff8965 100644
--- a/client/coral-admin/src/graphql/queries/metricsQuery.graphql
+++ b/client/coral-admin/src/graphql/queries/metricsQuery.graphql
@@ -4,4 +4,10 @@ query Metrics ($from: Date!, $to: Date!) {
assetsByFlag: assetMetrics(from: $from, to: $to, sort: FLAG) {
...metrics
}
+ 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 7e0f13989..25c7900bc 100644
--- a/client/coral-admin/src/translations.json
+++ b/client/coral-admin/src/translations.json
@@ -136,6 +136,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": {
@@ -283,6 +284,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} />
+
+
+
+
+
+
+