-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffb15b7
commit 13afe6e
Showing
7 changed files
with
140 additions
and
12 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
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
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,57 @@ | ||
<%@ page contentType="text/html;charset=UTF-8" %> | ||
<html> | ||
<head> | ||
<title></title> | ||
<meta name="layout" content="${grailsApplication.config.skin.layout}"/> | ||
<r:require modules="sockets" /> | ||
</head> | ||
<body> | ||
<div> | ||
<!-- Breadcrumb --> | ||
<ol class="breadcrumb"> | ||
<li><a class="font-xxsmall" href="../">Home</a></li> | ||
<li class="font-xxsmall active" href="#">Import</li> | ||
</ol> | ||
<!-- End Breadcrumb --> | ||
<h2 class="heading-medium">Regions import</h2> | ||
|
||
<p class="lead"> | ||
Reload regions information into the main search index | ||
</p> | ||
|
||
<div> | ||
<button id="start-import" onclick="javascript:loadInfo()" class="btn btn-primary">Import regions information</button> | ||
</div> | ||
|
||
<div class="well import-info alert-info hide" style="margin-top:20px;"> | ||
<p></p> | ||
<p id="import-info-web-socket"></p> | ||
</div> | ||
|
||
<r:script> | ||
function loadInfo(){ | ||
$.get("${createLink(controller:'import', action:'importRegions')}", function( data ) { | ||
if(data.success){ | ||
$('.import-info p').html('Import successfully started....') | ||
$('#start-import').prop('disabled', true); | ||
} else { | ||
$('.import-info p').html('Import failed. Check file path...') | ||
} | ||
$('.import-info').removeClass('hide'); | ||
}); | ||
} | ||
</r:script> | ||
<r:script> | ||
$(function() { | ||
var socket = new SockJS("${createLink(uri: '/stomp')}"); | ||
var client = Stomp.over(socket); | ||
client.connect({}, function() { | ||
client.subscribe("/topic/import-feedback", function(message) { | ||
$("#import-info-web-socket").append('<br/>' + message.body); | ||
}); | ||
}); | ||
}); | ||
</r:script> | ||
</div> | ||
</body> | ||
</html> |