document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <body>
  2.  {{> scada}}
  3. </body>
  4.  
  5. <template name=\'scada\'>
  6.  {{> yesNo name=\'balbula_1\' variable=\'balbula_1\'}}
  7.  {{> swBasicPerecentage name=\'input1\' variable= \'input1\' height=20 width=200}}
  8.  {{> swVelocimeter name=\'input2\' variable=\'input1\'}}
  9. </template>
  10.  
  11. <template name=\'yesNo\'>
  12.     {{#with dataValue this.variable}}
  13.         <div class=swidget name={{this.name}} >
  14.             <svg height=10 width=10>
  15.                 <circle cx=5 cy=5 r=5 fill={{getColor this.variable}} />
  16.             </svg>
  17.         </div>
  18.     {{/with}}
  19. </template>
  20.  
  21. <template name=\'swBasicPerecentage\'>
  22. {{#with dataValue this.variable}}
  23.     <div class=swidget name="{{this.name}}">
  24.         <svg height={{this.height}} width={{this.width}}>
  25.             <rect x1=0 y1=0 height={{this.height}} width="{{getWidth this.value}}" fill={{getColor this.value}} />
  26.             <text x={{xPosText}} y=15>{{this.value}}</text>
  27.         </svg>
  28.     </div>
  29. {{/with}}
  30. </template>
  31.  
  32. <template name=\'swVelocimeter\'>
  33. {{#with dataValue this.variable}}
  34.     <div class=swidget name="{{this.name}}">
  35.         <svg height="50" width="50">
  36.             <circle variable={{this.variable}} cx="25" cy="25" r="25" stroke=\'pink\' />
  37.             <line x1=25 y1=25 x2="{{x2 this.value}}" y2="{{y2 this.value}}" stroke=\'red\' stroke-width=5 />
  38.         </svg>
  39.       </div>
  40. {{/with}}
  41. </template>
');