forked from pyscada/PyScada
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.7.0rc7 - added admin for VariableProperty - added capability of reading and writing VariableProperties from the HMI and devices - altered arguents for device.write_data!
- Loading branch information
1 parent
94f8dbf
commit 3214e33
Showing
18 changed files
with
292 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ PyScada.egg-info | |
dist | ||
/.project | ||
docs/_build | ||
/.idea/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.13 on 2018-06-29 10:15 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('hmi', '0008_auto_20180620_0716'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='controlitem', | ||
name='property_name', | ||
field=models.CharField(blank=True, default='', max_length=255), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
{% if item.variable.active == 1 and item.variable.device.active == 1 %} | ||
<div class="hidden variable-config" data-name="{{ item.variable.name }}" data-key="{{ item.variable.pk }}" data-init-type="0"></div> | ||
{% if item.type == 0 %}<!-- label blue --> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-green var-{{ item.variable.pk }}">{{ item.label }}</span></div> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-green {{ item.web_class_str }}">{{ item.label }}</span></div> | ||
{% elif item.type == 1 %}<!-- label light blue --> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-green var-{{ item.variable.pk }}">{{ item.label }}</span></div> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-green {{ item.web_class_str }}">{{ item.label }}</span></div> | ||
{% elif item.type == 2 %}<!-- label ok --> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-green var-{{ item.variable.pk }}">{{ item.label }}</span></div> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-green {{ item.web_class_str }}">{{ item.label }}</span></div> | ||
{% elif item.type == 3 %}<!-- label warning --> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-yello var-{{ item.variable.pk }}">{{ item.label }}</span></div> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-yello {{ item.web_class_str }}">{{ item.label }}</span></div> | ||
{% elif item.type == 4 %}<!-- label alarm --> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-red var-{{ item.variable.pk }}">{{ item.label }}</span></div> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-red {{ item.web_class_str }}">{{ item.label }}</span></div> | ||
{% elif item.type == 7 %}<!-- label alarm inverted --> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-red-inv var-{{ item.variable.pk }}">{{ item.label }}</span></div> | ||
<div class="input-group control_label"><span class="label label-default type-bool status-red-inv {{ item.web_class_str }}">{{ item.label }}</span></div> | ||
{% elif item.type == 5 %}<!-- input --> | ||
{% if item.variable.value_class == 'BOOL' or item.variable.value_class == 'BOOLEAN' %} | ||
<div class="input-group control_button"><button type="button" var_id="{{ item.variable.pk }}" class="btn btn-default updateable write-task-btn type-bool var-{{ item.variable.pk }}" id="{{ item.web_id }}">{{ item.label }}</button></div> | ||
<div class="input-group control_button"><button type="button" var_id="{{ item.variable.pk }}" property_name="{{ item.property_name }}" class="btn btn-default updateable write-task-btn type-bool {{ item.web_class_str }}" id="{{ item.web_id }}">{{ item.label }}</button></div> | ||
{% else %} | ||
<div class="input-group set_value"> | ||
<span class="input-group-addon input-group-addon-label">{{ item.label }}</span> | ||
<input type="text" class="form-control var-{{ item.variable.pk }}" id="{{ item.web_id }}-value" placeholder=""> | ||
<input type="text" class="form-control {{ item.web_class_str }}" id="{{ item.web_id }}-value" placeholder=""> | ||
<span class="input-group-addon">{{ item.variable.unit.unit }}</span> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-default write-task-set set-{{ item.variable.pk }}" var_id="{{ item.variable.pk }}" id="{{ item.web_id }}" type="button">set</button> | ||
<button class="btn btn-default write-task-set set-{{ item.variable.pk }}" var_id="{{ item.variable.pk }}" property_name="{{ item.property_name }}" id="{{ item.web_id }}" type="button">set</button> | ||
</span> | ||
</div> | ||
{% endif %} | ||
{% elif item.type == 6 %}<!-- display value --> | ||
<div class="input-group control_label"><span class="type-label">{{ item.label }}<span class="type-unit"><span class="type-numeric var-{{ item.variable.pk }}">NaN</span> {{ item.variable.unit.unit }}</span></span></div> | ||
<div class="input-group control_label"><span class="type-label">{{ item.label }}<span class="type-unit"><span class="type-numeric {{ item.web_class_str }}">NaN</span> {{ item.variable.unit.unit }}</span></span></div> | ||
{% endif %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.