You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2015/01/20 01:16:38 UTC
[1/3] git commit: updated refs/heads/volume-upload to cef4447
Repository: cloudstack
Updated Branches:
refs/heads/volume-upload e4d104909 -> cef4447fd
Revert "Allow passing custom data in POST request"
This reverts commit e4d1049096152cb9fcd4b937666c8dfe8a035392.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f10709c7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f10709c7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f10709c7
Branch: refs/heads/volume-upload
Commit: f10709c756c9d9569e215ff21724ee79fa43bc89
Parents: e4d1049
Author: Jessica Wang <je...@apache.org>
Authored: Mon Jan 19 15:56:13 2015 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Jan 19 15:56:13 2015 -0800
----------------------------------------------------------------------
ui/scripts/templates.js | 6 +-----
ui/scripts/ui/dialog.js | 11 -----------
2 files changed, 1 insertion(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f10709c7/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index faf0403..1b6400a 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -110,11 +110,7 @@
fileUpload: {
getURL: function(args) {
args.response.success({
- url: 'http://10.223.183.3/test-upload.php',
- data: {
- testData1: '1',
- testData2: '2'
- }
+ url: 'http://10.223.183.3/test-upload.php'
});
},
postUpload: function(args) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f10709c7/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 00d2303..1c7904a 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -701,17 +701,6 @@
var $file = $form.find('input[type=file]');
var $field = $file.closest('.form-item .value');
- // Add additional passed data
- $.map(successArgs.data, function(v, k) {
- var $hidden = $('<input>').attr({
- type: 'hidden',
- name: k,
- value: v
- });
-
- $hidden.appendTo($frameForm);
- });
-
$uploadFrame.css({ width: $field.outerWidth(), height: $field.height() }).show();
$frameForm.append($file);
$field.append($uploadFrame);
[2/3] git commit: updated refs/heads/volume-upload to cef4447
Posted by je...@apache.org.
Revert "Add to storage->upload volume dialog"
This reverts commit 8641de85d2da4d755cfe966ea5c6c3aaf4abc2b5.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aa9a7f50
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aa9a7f50
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aa9a7f50
Branch: refs/heads/volume-upload
Commit: aa9a7f50b738a3e4acdcdcf2cf62c21e375242b9
Parents: f10709c
Author: Jessica Wang <je...@apache.org>
Authored: Mon Jan 19 15:56:48 2015 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Jan 19 15:56:48 2015 -0800
----------------------------------------------------------------------
ui/scripts/storage.js | 20 --------------------
1 file changed, 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa9a7f50/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 663fb9f..6585e1a 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -265,22 +265,6 @@
}
},
createForm: {
- fileUpload: {
- getURL: function(args) {
- args.response.success({
- url: 'http://10.223.183.3/test-upload.php'
- });
- },
- postUpload: function(args) {
- // Called when upload is done to do
- // verification checks;
- // i.e., poll the server to verify successful upload
- //
- // success() will close the dialog and call standard action
- // error() will keep dialog open if user wants to re-submit
- args.response.success();
- }
- },
title: 'label.upload.volume',
fields: {
name: {
@@ -290,10 +274,6 @@
},
docID: 'helpUploadVolumeName'
},
- templateFileUpload: {
- label: 'Select a file',
- isFileUpload: true
- },
availabilityZone: {
label: 'label.availability.zone',
docID: 'helpUploadVolumeZone',
[3/3] git commit: updated refs/heads/volume-upload to cef4447
Posted by je...@apache.org.
(1) Remove UploadFile button from Register Template dialog. (2) sync latest templates.js from master branch.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cef4447f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cef4447f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cef4447f
Branch: refs/heads/volume-upload
Commit: cef4447fd4c5b5a982098405721ac8e27c644859
Parents: aa9a7f5
Author: Jessica Wang <je...@apache.org>
Authored: Mon Jan 19 16:13:57 2015 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Jan 19 16:13:57 2015 -0800
----------------------------------------------------------------------
ui/scripts/templates.js | 241 ++++++++++++++++++++++---------------------
1 file changed, 125 insertions(+), 116 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef4447f/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 1b6400a..86f9159 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -43,6 +43,9 @@
mine: {
label: 'ui.listView.filters.mine'
},
+ shared: {
+ label: 'Shared'
+ },
featured: {
label: 'label.featured'
},
@@ -107,22 +110,6 @@
title: 'label.action.register.template',
docID: 'helpNetworkOfferingName',
preFilter: cloudStack.preFilter.createTemplate,
- fileUpload: {
- getURL: function(args) {
- args.response.success({
- url: 'http://10.223.183.3/test-upload.php'
- });
- },
- postUpload: function(args) {
- // Called when upload is done to do
- // verification checks;
- // i.e., poll the server to verify successful upload
- //
- // success() will close the dialog and call standard action
- // error() will keep dialog open if user wants to re-submit
- args.response.success();
- }
- },
fields: {
name: {
label: 'label.name',
@@ -131,10 +118,6 @@
required: true
}
},
- templateFileUpload: {
- label: 'Select a file',
- isFileUpload: true
- },
description: {
label: 'label.description',
docID: 'helpRegisterTemplateDescription',
@@ -342,11 +325,19 @@
});
items.push({
id: "us",
- description: "US"
+ description: "US Keboard"
+ });
+ items.push({
+ id: "uk",
+ description: "UK Keyboard"
});
items.push({
id: "jp",
- description: "Japanese"
+ description: "Japanese Keyboard"
+ });
+ items.push({
+ id: "sc",
+ description: "Simplified Chinese"
});
args.response.success({
data: items
@@ -428,20 +419,18 @@
osTypeId: {
label: 'label.os.type',
docID: 'helpRegisterTemplateOSType',
- select: function(args) {
- if (ostypeObjs == undefined) {
- $.ajax({
- url: createURL("listOsTypes"),
- dataType: "json",
- async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
- }
- });
- }
- args.response.success({
- data: ostypeObjs
- });
+ select: function(args) {
+ $.ajax({
+ url: createURL("listOsTypes"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var ostypeObjs = json.listostypesresponse.ostype;
+ args.response.success({
+ data: ostypeObjs
+ });
+ }
+ });
}
},
@@ -611,6 +600,11 @@
templatefilter: 'self'
});
break;
+ case "shared":
+ $.extend(data, {
+ templatefilter: 'shared'
+ });
+ break;
case "featured":
ignoreProject = true;
$.extend(data, {
@@ -663,6 +657,10 @@
detailView: {
name: 'Template details',
+ viewAll: {
+ label: 'label.instances',
+ path: 'instances'
+ },
actions: {
edit: {
label: 'label.edit',
@@ -865,16 +863,16 @@
}
if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) {
- if (ostypeObjs == undefined) {
- $.ajax({
- url: createURL("listOsTypes"),
- dataType: "json",
- async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
- }
- });
- }
+ var ostypeObjs;
+ $.ajax({
+ url: createURL("listOsTypes"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var ostypeObjs = json.listostypesresponse.ostype;
+ }
+ });
+
if (ostypeObjs != undefined) {
var ostypeName;
for (var i = 0; i < ostypeObjs.length; i++) {
@@ -926,7 +924,7 @@
}
},
isextractable: {
- label: 'label.extractable',
+ label: 'label.extractable.lower',
isBoolean: true,
isEditable: function() {
if (isAdmin())
@@ -979,16 +977,16 @@
label: 'label.os.type',
isEditable: true,
select: function(args) {
- if (ostypeObjs == undefined) {
- $.ajax({
- url: createURL("listOsTypes"),
- dataType: "json",
- async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
- }
- });
- }
+ var ostypeObjs;
+ $.ajax({
+ url: createURL("listOsTypes"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ ostypeObjs = json.listostypesresponse.ostype;
+ }
+ });
+
var items = [];
$(ostypeObjs).each(function() {
items.push({
@@ -1078,7 +1076,7 @@
label: 'label.status'
},
isready: {
- label: 'state.ready',
+ label: 'state.Ready',
converter: cloudStack.converters.toBooleanText
}
},
@@ -1116,6 +1114,7 @@
},
detailView: {
+ noCompact: true,
actions: {
remove: {
label: 'label.action.delete.template',
@@ -1246,16 +1245,16 @@
}
if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) {
- if (ostypeObjs == undefined) {
- $.ajax({
- url: createURL("listOsTypes"),
- dataType: "json",
- async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
- }
- });
- }
+ var ostypeObjs;
+ $.ajax({
+ url: createURL("listOsTypes"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ ostypeObjs = json.listostypesresponse.ostype;
+ }
+ });
+
if (ostypeObjs != undefined) {
var ostypeName;
for (var i = 0; i < ostypeObjs.length; i++) {
@@ -1292,7 +1291,7 @@
label: 'label.zone.id'
},
isready: {
- label: 'state.ready',
+ label: 'state.Ready',
converter: cloudStack.converters.toBooleanText
},
status: {
@@ -1324,7 +1323,7 @@
}
},
isextractable: {
- label: 'extractable',
+ label: 'label.extractable.lower',
isBoolean: true,
isEditable: function() {
if (isAdmin())
@@ -1341,7 +1340,7 @@
converter: cloudStack.converters.toBooleanText
},
isdynamicallyscalable: {
- label: 'Dynamically Scalable',
+ label: 'label.dynamically.scalable',
isBoolean: true,
isEditable: true,
converter: cloudStack.converters.toBooleanText
@@ -1377,16 +1376,16 @@
label: 'label.os.type',
isEditable: true,
select: function(args) {
- if (ostypeObjs == undefined) {
- $.ajax({
- url: createURL("listOsTypes"),
- dataType: "json",
- async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
- }
- });
- }
+ var ostypeObjs;
+ $.ajax({
+ url: createURL("listOsTypes"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ ostypeObjs = json.listostypesresponse.ostype;
+ }
+ });
+
var items = [];
$(ostypeObjs).each(function() {
items.push({
@@ -1474,6 +1473,9 @@
mine: {
label: 'ui.listView.filters.mine'
},
+ shared: {
+ label: 'Shared'
+ },
featured: {
label: 'label.featured'
},
@@ -1580,27 +1582,25 @@
required: true
},
select: function(args) {
- if (ostypeObjs == undefined) {
- $.ajax({
- url: createURL("listOsTypes"),
- dataType: "json",
- async: false,
- success: function(json) {
- osTypeObjs = json.listostypesresponse.ostype;
- }
- });
- }
- var items = [];
- //items.push({id: "", description: "None"}); //shouldn't have None option when bootable is checked
- $(osTypeObjs).each(function() {
- items.push({
- id: this.id,
- description: this.description
- });
- });
- args.response.success({
- data: items
- });
+ $.ajax({
+ url: createURL("listOsTypes"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var ostypeObjs = json.listostypesresponse.ostype;
+ var items = [];
+ //items.push({id: "", description: "None"}); //shouldn't have None option when bootable is checked
+ $(ostypeObjs).each(function() {
+ items.push({
+ id: this.id,
+ description: this.description
+ });
+ });
+ args.response.success({
+ data: items
+ });
+ }
+ });
}
},
@@ -1741,6 +1741,11 @@
isofilter: 'self'
});
break;
+ case "shared":
+ $.extend(data, {
+ isofilter: 'shared'
+ });
+ break;
case "featured":
ignoreProject = true;
$.extend(data, {
@@ -1796,6 +1801,10 @@
detailView: {
name: 'label.details',
+ viewAll: {
+ label: 'label.instances',
+ path: 'instances'
+ },
actions: {
edit: {
label: 'label.edit',
@@ -1963,7 +1972,7 @@
}
},
isextractable: {
- label: 'label.extractable',
+ label: 'label.extractable.lower',
isBoolean: true,
isEditable: function() {
if (isAdmin())
@@ -2074,7 +2083,7 @@
label: 'label.status'
},
isready: {
- label: 'state.ready',
+ label: 'state.Ready',
converter: cloudStack.converters.toBooleanText
}
},
@@ -2228,7 +2237,7 @@
}
}, {
id: {
- label: 'ID'
+ label: 'label.id'
},
zonename: {
label: 'label.zone.name'
@@ -2261,7 +2270,7 @@
}
},
isextractable: {
- label: 'extractable',
+ label: 'label.extractable.lower',
isBoolean: true,
isEditable: function() {
if (isAdmin())
@@ -2297,16 +2306,16 @@
label: 'label.os.type',
isEditable: true,
select: function(args) {
- if (ostypeObjs == undefined) {
- $.ajax({
- url: createURL("listOsTypes"),
- dataType: "json",
- async: false,
- success: function(json) {
- ostypeObjs = json.listostypesresponse.ostype;
- }
- });
- }
+ var ostypeObjs;
+ $.ajax({
+ url: createURL("listOsTypes"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ ostypeObjs = json.listostypesresponse.ostype;
+ }
+ });
+
var items = [];
$(ostypeObjs).each(function() {
items.push({