edgeEvents refactoring
This commit is contained in:
parent
9ee792cac3
commit
7582d503fb
@ -13,6 +13,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
import { grey300, grey900 } from 'material-ui/styles/colors';
|
||||||
|
|
||||||
export default angular.module('thingsboard.types', [])
|
export default angular.module('thingsboard.types', [])
|
||||||
.constant('types',
|
.constant('types',
|
||||||
{
|
{
|
||||||
@ -403,6 +405,16 @@ export default angular.module('thingsboard.types', [])
|
|||||||
widgetType: "WIDGET_TYPE",
|
widgetType: "WIDGET_TYPE",
|
||||||
adminSettings: "ADMIN_SETTINGS"
|
adminSettings: "ADMIN_SETTINGS"
|
||||||
},
|
},
|
||||||
|
edgeEventStatus: {
|
||||||
|
"DEPLOYED": {
|
||||||
|
name: "edge.deployed",
|
||||||
|
color: grey900
|
||||||
|
},
|
||||||
|
"PENDING": {
|
||||||
|
name: "edge.pending",
|
||||||
|
color: grey300
|
||||||
|
}
|
||||||
|
},
|
||||||
edgeAttributeKeys: {
|
edgeAttributeKeys: {
|
||||||
active: "active",
|
active: "active",
|
||||||
lastConnectTime: "lastConnectTime",
|
lastConnectTime: "lastConnectTime",
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<div class="tb-cell" flex="20">{{ event.type }}</div>
|
<div class="tb-cell" flex="20">{{ event.type }}</div>
|
||||||
<div class="tb-cell" flex="40">{{ event.action }}</div>
|
<div class="tb-cell" flex="40">{{ event.action }}</div>
|
||||||
<div class="tb-cell" flex="20">{{ event.entityId }}</div>
|
<div class="tb-cell" flex="20">{{ event.entityId }}</div>
|
||||||
<div class="tb-cell" flex="15" ng-style="{'color': statusColor}">{{ updateStatus(event.createdTime) | translate }}</div>
|
<div class="tb-cell" flex="15" ng-style="{'color': statusColor}">{{ updateStatus(event.createdTime) }}</div>
|
||||||
<div class="tb-cell" flex="10">
|
<div class="tb-cell" flex="10">
|
||||||
<md-button ng-if="checkEdgeEventType(event.type)" class="md-icon-button md-primary"
|
<md-button ng-if="checkEdgeEventType(event.type)" class="md-icon-button md-primary"
|
||||||
ng-click="showEdgeEntityContent($event, 'edge.entity-info', 'JSON')"
|
ng-click="showEdgeEntityContent($event, 'edge.entity-info', 'JSON')"
|
||||||
|
|||||||
@ -169,11 +169,11 @@ export default function EventRowDirective($compile, $templateCache, $mdDialog, $
|
|||||||
scope.updateStatus = function(eventCreatedTime) {
|
scope.updateStatus = function(eventCreatedTime) {
|
||||||
var status;
|
var status;
|
||||||
if (eventCreatedTime < scope.queueStartTs) {
|
if (eventCreatedTime < scope.queueStartTs) {
|
||||||
status = $translate.instant('edge.success');
|
status = $translate.instant(types.edgeEventStatus.DEPLOYED.name);
|
||||||
scope.statusColor = '#000';
|
scope.statusColor = types.edgeEventStatus.DEPLOYED.color;
|
||||||
} else {
|
} else {
|
||||||
status = $translate.instant('edge.failed');
|
status = $translate.instant(types.edgeEventStatus.PENDING.name);
|
||||||
scope.statusColor = 'rgba(0, 0, 0, .38)';
|
scope.statusColor = types.edgeEventStatus.PENDING.color;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -805,8 +805,8 @@
|
|||||||
"set-root-rule-chain-to-edges": "Regelkette zur Wurzel machen für die Rand",
|
"set-root-rule-chain-to-edges": "Regelkette zur Wurzel machen für die Rand",
|
||||||
"set-root-rule-chain-to-edges-text": "Die Regelkette zur Wurzel für { count, plural, 1 {1 Rand} other {# Rand} } machen",
|
"set-root-rule-chain-to-edges-text": "Die Regelkette zur Wurzel für { count, plural, 1 {1 Rand} other {# Rand} } machen",
|
||||||
"status": "Von Rand empfangen",
|
"status": "Von Rand empfangen",
|
||||||
"success": "Bereitgestellt",
|
"deployed": "Bereitgestellt",
|
||||||
"failed": "Steht aus",
|
"pending": "Steht aus",
|
||||||
"entity-id": "Entität ID",
|
"entity-id": "Entität ID",
|
||||||
"entity-info": "Entitätsinfo",
|
"entity-info": "Entitätsinfo",
|
||||||
"event-action": "Ereignisaktion",
|
"event-action": "Ereignisaktion",
|
||||||
|
|||||||
@ -817,7 +817,7 @@
|
|||||||
"make-private-edge-text": "After the confirmation the edge and all its data will be made private and won't be accessible by others.",
|
"make-private-edge-text": "After the confirmation the edge and all its data will be made private and won't be accessible by others.",
|
||||||
"import": "Import edge",
|
"import": "Import edge",
|
||||||
"label": "Label",
|
"label": "Label",
|
||||||
"load-entity-error": "Entity not found. Failed to load info",
|
"load-entity-error": "Failed to load data. Entity not found or has been deleted.",
|
||||||
"assign-new-edge": "Assign new edge",
|
"assign-new-edge": "Assign new edge",
|
||||||
"manage-edge-dashboards": "Manage edge dashboards",
|
"manage-edge-dashboards": "Manage edge dashboards",
|
||||||
"unassign-from-edge": "Unassign from edge",
|
"unassign-from-edge": "Unassign from edge",
|
||||||
@ -841,8 +841,8 @@
|
|||||||
"set-root-rule-chain-to-edges": "Set root rule chain for Edge(s)",
|
"set-root-rule-chain-to-edges": "Set root rule chain for Edge(s)",
|
||||||
"set-root-rule-chain-to-edges-text": "Set root rule chain for { count, plural, 1 {1 edge} other {# edges} }",
|
"set-root-rule-chain-to-edges-text": "Set root rule chain for { count, plural, 1 {1 edge} other {# edges} }",
|
||||||
"status": "Received by edge",
|
"status": "Received by edge",
|
||||||
"success": "Deployed",
|
"deployed": "Deployed",
|
||||||
"failed": "Pending"
|
"pending": "Pending"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"unable-to-connect": "Unable to connect to the server! Please check your internet connection.",
|
"unable-to-connect": "Unable to connect to the server! Please check your internet connection.",
|
||||||
|
|||||||
@ -818,8 +818,8 @@
|
|||||||
"set-root-rule-chain-to-edges": "Establecer la cadena de reglas raíz para Edge (s)",
|
"set-root-rule-chain-to-edges": "Establecer la cadena de reglas raíz para Edge (s)",
|
||||||
"set-root-rule-chain-to-edges-text": "Establecer la cadena de la regla raíz para {count, plural, 1 {1 borde} other {# bordes}}",
|
"set-root-rule-chain-to-edges-text": "Establecer la cadena de la regla raíz para {count, plural, 1 {1 borde} other {# bordes}}",
|
||||||
"status": "Recibido por borde",
|
"status": "Recibido por borde",
|
||||||
"success": "Desplegada",
|
"deployed": "Desplegada",
|
||||||
"failed": "Pendiente",
|
"pending": "Pendiente",
|
||||||
"entity-id": "ID de entidad",
|
"entity-id": "ID de entidad",
|
||||||
"entity-info": "Entity info",
|
"entity-info": "Entity info",
|
||||||
"event-action": "Información de la entidad",
|
"event-action": "Información de la entidad",
|
||||||
|
|||||||
@ -823,8 +823,8 @@
|
|||||||
"set-root-rule-chain-to-edges": "Définir la chaîne de règles racine pour bordure(s)",
|
"set-root-rule-chain-to-edges": "Définir la chaîne de règles racine pour bordure(s)",
|
||||||
"set-root-rule-chain-to-edges-text": "Définir la chaîne de règles racine pour {count, plural, 1 {1 bordure} other {# bordures} }",
|
"set-root-rule-chain-to-edges-text": "Définir la chaîne de règles racine pour {count, plural, 1 {1 bordure} other {# bordures} }",
|
||||||
"status": "Reçu par bord",
|
"status": "Reçu par bord",
|
||||||
"success": "Déployée",
|
"deployed": "Déployée",
|
||||||
"failed": "En attente",
|
"pending": "En attente",
|
||||||
"entity-id": "ID d'entité",
|
"entity-id": "ID d'entité",
|
||||||
"entity-info": "Informations sur l'entité",
|
"entity-info": "Informations sur l'entité",
|
||||||
"event-action": "Action d'événement",
|
"event-action": "Action d'événement",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user