From 66ac7191b61876aebbb5b251738d8fe738507c29 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Mon, 19 Mar 2018 13:15:34 +0100 Subject: [PATCH] Adding a mock module to test stuff --- .../css/icons/station_icon_status_0_xmas.png | Bin 0 -> 540 bytes mock/__init__.py | 0 mock/admin.py | 3 ++ mock/migrations/__init__.py | 0 mock/models.py | 3 ++ mock/templates/mock/zymogridmapclient.html | 27 ++++++++++++++++++ mock/tests.py | 3 ++ mock/urls.py | 23 +++++++++++++++ mock/views.py | 7 +++++ 9 files changed, 66 insertions(+) create mode 100644 VIPSWeb/static/css/icons/station_icon_status_0_xmas.png create mode 100755 mock/__init__.py create mode 100755 mock/admin.py create mode 100755 mock/migrations/__init__.py create mode 100755 mock/models.py create mode 100644 mock/templates/mock/zymogridmapclient.html create mode 100755 mock/tests.py create mode 100644 mock/urls.py create mode 100755 mock/views.py diff --git a/VIPSWeb/static/css/icons/station_icon_status_0_xmas.png b/VIPSWeb/static/css/icons/station_icon_status_0_xmas.png new file mode 100644 index 0000000000000000000000000000000000000000..059c00b378efaca99c5d723f541319c6b1cfc06c GIT binary patch literal 540 zcmeAS@N?(olHy`uVBq!ia0y~yVBlw9U=ZP8V_;wiI-V}Xz`($k<n8Xl@E-&h>|H*Y zfq{Xuz$3Dlfq`2Xgc%uT&5>YWU|=ut^mS!_$j!yaW;HqU!5Iby#+9Bfjv*GOdoSB& zh&qa}KFAkV{?RSL{gqW$L@{CoV|Y%BdXrKF$3YP(>9?+LHuvR9Il3r?iA8DL;E0Oo zn5xq>*Xf9xSyQk5k3Zr`8$TD^c;l?Ev%CEHoSDVv@6670JMlaIbpdy9*Qd?XPVjV1 z2!HWF-E2$lgsl^<JrG@&tg82bd7H+mI4;>JrJZ&Ub=3?-!{=$AiVF&AjuGbk8Tsa5 zMM#+pduxr_I{pc=pCntJocDg?-g<S%8jbVYPp`XMJO9b!9}=CS&!(OFr=4nk&D^Y} zNAB1L)1&;?Pjk1_NNxWpEi7@=FQ!*+%~8+0=Ym~-TG>{z=N+3Ywo!I<lAZMX-S00t zE82%l&Yu3fP?O26K-@h#DqT=q^y%VRF}LR@#xwuOc5u&oef@6vZ$>`zhTR`jPl`XP zjymyP!^_#JPF3+<hg<F8?j`TCyNYyfW(1vh&-=PeYtFGxEHz6mI#ichFQ1hCr%O2U zN_;tg`XB3O1%845GPXTWlR4a2VY|3+k(SNDTGz<0&lRK%PRrUHwlPawWZAbNr(ug= rPEY@f_W!E&hosjWu&&8x{>ykkH2-|K<GSAr3=9mOu6{1-oD!M<K3?J> literal 0 HcmV?d00001 diff --git a/mock/__init__.py b/mock/__init__.py new file mode 100755 index 00000000..e69de29b diff --git a/mock/admin.py b/mock/admin.py new file mode 100755 index 00000000..8c38f3f3 --- /dev/null +++ b/mock/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/mock/migrations/__init__.py b/mock/migrations/__init__.py new file mode 100755 index 00000000..e69de29b diff --git a/mock/models.py b/mock/models.py new file mode 100755 index 00000000..71a83623 --- /dev/null +++ b/mock/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/mock/templates/mock/zymogridmapclient.html b/mock/templates/mock/zymogridmapclient.html new file mode 100644 index 00000000..7f6e1695 --- /dev/null +++ b/mock/templates/mock/zymogridmapclient.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html lang="no"> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>TEST GRID map client</title> + <style type="text/css"> + body { + background-color: #dddddd; + } + </style> +</head> +<body> + <h1>Let's say this is the EuroWheat web page</h1> + <p>What you do is that you include the following code in your HTML</p> + <code> + <div id="zymoGridMapContainer" style="width:800px;"></div><br/> + <script id="zymoGridMapScript" type="text/javascript" src="{{settings.VIPSLOGIC_PROTOCOL}}://{{settings.VIPSLOGIC_SERVER_NAME}}/public/nordic_septoria_whs/nordic_septoria_whs.js"/></script> + </code> + <p>Then the application will look like this</p> + <div id="zymoGridMapContainer" style="width:800px;"></div> + <!-- script id="zymoGridMapScript" type="text/javascript" src="{{settings.VIPSLOGIC_PROTOCOL}}://{{settings.VIPSLOGIC_SERVER_NAME}}/public/nordic_septoria_whs/nordic_septoria_whs.js"/></script--> + <script id="zymoGridMapScript" type="text/javascript" src="http://restclienthtml/public/nordic_septoria_whs/nordic_septoria_whs.js"/></script> + <p>If you omit the style attribute, then the application will fill all available space</p> +</body> +</html> \ No newline at end of file diff --git a/mock/tests.py b/mock/tests.py new file mode 100755 index 00000000..7ce503c2 --- /dev/null +++ b/mock/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/mock/urls.py b/mock/urls.py new file mode 100644 index 00000000..5dbf01c9 --- /dev/null +++ b/mock/urls.py @@ -0,0 +1,23 @@ +# +# Copyright (c) 2014 NIBIO <http://www.nibio.no/>. +# +# This file is part of VIPSWeb. +# VIPSWeb is free software: you can redistribute it and/or modify +# it under the terms of the NIBIO Open Source License as published by +# NIBIO, either version 1 of the License, or (at your option) any +# later version. +# +# VIPSWeb is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# NIBIO Open Source License for more details. +# +# You should have received a copy of the NIBIO Open Source License +# along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. +# + +from django.conf.urls import patterns, url +from mock import views +urlpatterns = patterns('mock.views', + url(r'^zymogridmapclient/$', views.zymogridmapclient, name='zymogridmapclient'), +) diff --git a/mock/views.py b/mock/views.py new file mode 100755 index 00000000..9987ce40 --- /dev/null +++ b/mock/views.py @@ -0,0 +1,7 @@ +from django.shortcuts import render + +# Create your views here. + + +def zymogridmapclient(request): + return render(request, 'mock/zymogridmapclient.html', {}) \ No newline at end of file -- GitLab