/[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 2899 by torben, Mon Feb 1 09:24:15 2016 UTC revision 2918 by torben, Thu Feb 4 14:40:36 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 41  function loadTasks() { Line 41  function loadTasks() {
41                                                    
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'>";
45                            if (entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED") {
46                                    html += "<button type='button' class='close removetask' aria-label='Close' taskid='" + entry.id+ "'><span aria-hidden='true'>&times;</span></button>";
47                            }
48                            html += "<h4 class='panel-title'>" + entry.description + "</h4>";
49                            html += "</div>";
50                          html += "  <div class='panel-body'>";                          html += "  <div class='panel-body'>";
51    
52                          html += entry.detail;                          html += entry.detail;
# Line 60  function loadTasks() { Line 65  function loadTasks() {
65                                  }                                  }
66                          }                          }
67                                                    
68                          html += "<br/><div style='font-size: 8px; margin: 7px;'>" + entry.state + "</div>";                          var viewlog = "";
69                            if (entry.state == "STATE_RUNNING" || entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED") {
70                                    viewlog = "<span style='float: right'><a href='#' class='viewlog' taskid='" + entry.id+ "'>Log</a></span>";
71                            }
72                            
73                            html += "  <div style='font-size: 8px; '>" + entry.state + viewlog + "</div>";
74                                                    
75                          html += "  </div>"; //panel-body                          html += "  </div>"; //panel-body
76                          html += "</div>"; //panel                          html += "</div>"; //panel
# Line 89  function genUploadExtraData (previewId, Line 99  function genUploadExtraData (previewId,
99    
100  $(document).ready( function() {  $(document).ready( function() {
101          loadTasks();          loadTasks();
102          setInterval(loadTasks, 2500);          setInterval(loadTasks, 5000);
103                    
104                    
105            $(document).on('click', '.viewlog', function(event) { // Bind future elements
106                    var taskid = $(this).attr('taskid');
107                    $("#logview").load('rest/tasks/log/' + taskid);
108                    
109            });
110            
111            $(document).on('click', '.removetask', function(event) { // Bind future elements
112                    var taskid = $(this).attr('taskid');
113                    $.get('rest/tasks/remove/' + taskid, function() {
114                            loadTasks();
115                    });            
116            });
117            
118          $("#file").fileinput({          $("#file").fileinput({
119                  //'showUpload':false,                  //'showUpload':false,
120                  'showRemove': false,                              'showRemove': false,            
# Line 138  $(document).ready( function() { Line 161  $(document).ready( function() {
161    </head>    </head>
162    <body>    <body>
163        
164  <div class="container">  <div class="container-fluid">
165    <div class="page-header">    <div class="page-header">
166      <h1>Dao Adresse Vedligehold</h1>      <h1>Dao Adresse Vedligehold</h1>
167    </div>    </div>
168    <div id="body">    <div id="body">
169      <div class="row">      <div class="row">
170        <div class="col-sm-3" id="leftCol" >      <div class="col-sm-1" id="leftCol-blank" >
171        </div>
172        
173          <div class="col-sm-2" id="leftCol" >
174          <div class="panel panel-primary">          <div class="panel panel-primary">
175                  <div class="panel-heading">                  <div class="panel-heading">
176                          <h3 class="panel-title">Queue</h3>                          <h3 class="panel-title">Queue</h3>
# Line 157  $(document).ready( function() { Line 183  $(document).ready( function() {
183          </div>          </div>
184        </div>        </div>
185                
186        <div class="col-sm-6" id="center" >        <div class="col-sm-6" id="center">
187          b        <pre id="logview">
188          </pre>
189        </div>        </div>
190                
191        <div class="col-sm-3" id="rightCol" >        <div class="col-sm-2" id="rightCol" >
192          <div class="panel panel-primary">          <div class="panel panel-primary">
193                  <div class="panel-heading">                  <div class="panel-heading">
194                          <h3 class="panel-title">Upload File</h3>                          <h3 class="panel-title">Upload File</h3>

Legend:
Removed from v.2899  
changed lines
  Added in v.2918

  ViewVC Help
Powered by ViewVC 1.1.20