/[projects]/dao/DaoAdresseVedligehold/src/main/webapp/index.html
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/webapp/index.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2891 by torben, Sun Jan 31 22:45:03 2016 UTC revision 2917 by torben, Thu Feb 4 14:21:30 2016 UTC
# Line 19  Line 19 
19    
20    
21  function loadTasks() {  function loadTasks() {
22          $.get("TaskServlet", function(data) {          $.get("rest/tasks/list", function(data) {
23                  //console.log(data);                  //console.log(data);
24                                    
25                                    
# Line 42  function loadTasks() { Line 42  function loadTasks() {
42                                                    
43                          html += "<div class='panel " + pclass + "'>";                          html += "<div class='panel " + pclass + "'>";
44                          html += "<div class='panel-heading'><h4 class='panel-title'>" + entry.description + "</h4></div>";                          html += "<div class='panel-heading'><h4 class='panel-title'>" + entry.description + "</h4></div>";
45                            html += "  <div class='panel-body'>";
46    
47                          html += entry.detail;                          html += entry.detail;
48                                                    
# Line 59  function loadTasks() { Line 60  function loadTasks() {
60                                  }                                  }
61                          }                          }
62                                                    
63                          html += "<br/><div style='font-size: 8px; margin: 7px;'>" + entry.state + "</div>";                          var viewlog = "";
64                            if (entry.state == "STATE_RUNNING" || entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED") {
65                                    viewlog = "<span style='float: right'><a href='#' class='viewlog' taskid='" + entry.id+ "'>Log</a></span>";
66                            }
67                            
68                            html += "  <div style='font-size: 8px; '>" + entry.state + viewlog + "</div>";
69                                                    
70                          html += "</div>";                          html += "  </div>"; //panel-body
71                            html += "</div>"; //panel
72                                                    
73                  });                  });
74                  if (html == "") {                  if (html == "") {
# Line 87  function genUploadExtraData (previewId, Line 94  function genUploadExtraData (previewId,
94    
95  $(document).ready( function() {  $(document).ready( function() {
96          loadTasks();          loadTasks();
97          setInterval(loadTasks, 2500);          setInterval(loadTasks, 5000);
98            
99                    
100            $(document).on('click', '.viewlog', function(event) { // Bind future elements
101                    var taskid = $(this).attr('taskid');
102                    $("#logview").load('rest/tasks/log/' + taskid);
103                    
104            });
105                    
106          $("#file").fileinput({          $("#file").fileinput({
107                  //'showUpload':false,                  //'showUpload':false,
# Line 123  $(document).ready( function() { Line 136  $(document).ready( function() {
136                  }                  }
137                                    
138                                    
139                  $.get("rest/commands/distancecalculation/" + dist);                  $.get("rest/commands/distancecalculation/" + dist, function() {
140                            loadTasks(); //Force reload of tasks immediately
141                    } );
142                                    
143          });          });
144                    
# Line 134  $(document).ready( function() { Line 149  $(document).ready( function() {
149    </head>    </head>
150    <body>    <body>
151        
152  <div class="container">  <div class="container-fluid">
153    <div class="page-header">    <div class="page-header">
154      <h1>Dao Adresse Vedligehold</h1>      <h1>Dao Adresse Vedligehold</h1>
155    </div>    </div>
156    <div id="body">    <div id="body">
157      <div class="row">      <div class="row">
158        <div class="col-sm-3" id="leftCol" >      <div class="col-sm-1" id="leftCol-blank" >
159        </div>
160        
161          <div class="col-sm-2" id="leftCol" >
162          <div class="panel panel-primary">          <div class="panel panel-primary">
163                  <div class="panel-heading">                  <div class="panel-heading">
164                          <h3 class="panel-title">Queue</h3>                          <h3 class="panel-title">Queue</h3>
# Line 153  $(document).ready( function() { Line 171  $(document).ready( function() {
171          </div>          </div>
172        </div>        </div>
173                
174        <div class="col-sm-6" id="center" >        <div class="col-sm-6" id="center">
175          b        <pre id="logview">
176          </pre>
177        </div>        </div>
178                
179        <div class="col-sm-3" id="rightCol" >        <div class="col-sm-2" id="rightCol" >
180          <div class="panel panel-primary">          <div class="panel panel-primary">
181                  <div class="panel-heading">                  <div class="panel-heading">
182                          <h3 class="panel-title">Upload File</h3>                          <h3 class="panel-title">Upload File</h3>

Legend:
Removed from v.2891  
changed lines
  Added in v.2917

  ViewVC Help
Powered by ViewVC 1.1.20