Skip to content

Commit 8f9f164

Browse files
committed
display in-progress message for large transfers, preserve top level folder name
1 parent 30929ae commit 8f9f164

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
build
22
moveit.spec
3+
__pycache__/
34
.DS_Store
45
gui/node_modules
56
gui/package-lock.json
67
gui/install
8+
gui/sfu-moveit-win32-x64/

Diff for: gui/inProgress.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>MoveIt</title>
7+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
8+
<script>window.jQuery = window.$ = require('jquery');</script>
9+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
10+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
11+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
12+
</head>
13+
14+
<body>
15+
<h3 align="center">Bagging...<div class="version"></div></h3><br/>
16+
</body>
17+
18+
</html>

Diff for: gui/makePackage.js

+20
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,27 @@ function package() {
3434
packageFolder = dialog.showOpenDialogSync({properties: ["openDirectory"]});
3535
if (packageFolder){
3636
notifier.notify({"title" : "MoveIt", "message" : "Creating transfer package..."});
37+
var window = remote.getCurrentWindow();
38+
var childWindow = new remote.BrowserWindow({
39+
parent: window,
40+
modal: true,
41+
show: false,
42+
width: 300,
43+
height: 100,
44+
webPreferences: {
45+
nodeIntegration: true
46+
}
47+
});
48+
childWindow.loadURL(require('url').format({
49+
pathname: path.join(__dirname, 'inProgress.html'),
50+
protocol: 'file:',
51+
slashes: true
52+
}));
53+
childWindow.once('ready-to-show', () => {
54+
childWindow.show()
55+
});
3756
client.invoke("bag_package", contactname, jobtitle, department, email, phone, creator, rrsda, title, datefrom, dateto, description, metadata, JSON.stringify(packageFolder[0]), function(error, res, more) {
57+
childWindow.close();
3858
if (res === true){
3959
notifier.notify({"title" : "MoveIt", "message" : "Transfer package has been created on desktop."});
4060
var configblock = {"contactname": contactname, "jobtitle": jobtitle, "department": department, "email": email, "phone": phone};

Diff for: moveit.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def bag_package(self, contactname, jobtitle, department, email, phone, creator,
1818
if os.path.isdir(bag_dir_parent):
1919
shutil.rmtree(bag_dir_parent)
2020
bag_dir = os.path.join(bag_dir_parent, 'bag')
21-
os.makedirs(bag_dir)
22-
copy_tree(os.path.normpath(package_folder.strip('"')), bag_dir)
21+
os.makedirs(os.path.join(bag_dir, os.path.basename(package_folder.strip('"'))))
22+
copy_tree(os.path.normpath(package_folder.strip('"')), os.path.join(bag_dir, os.path.basename(package_folder.strip('"'))))
2323

2424
for root, sub, files in os.walk(bag_dir):
2525
for file in files:

0 commit comments

Comments
 (0)