Remove UI test data

This commit is contained in:
bfederle 2012-01-27 09:01:57 -08:00
parent cdbf85e3e6
commit 83bc7d1c81
32 changed files with 29 additions and 14388 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1536,8 +1536,6 @@
<script src="scripts/ui/widgets/treeView.js" type="text/javascript"></script> <script src="scripts/ui/widgets/treeView.js" type="text/javascript"></script>
<script src="scripts/ui/widgets/notifications.js" type="text/javascript"></script> <script src="scripts/ui/widgets/notifications.js" type="text/javascript"></script>
<script src="scripts-test/test-data.js" type="text/javascript"></script>
<!-- Common libraries --> <!-- Common libraries -->
<script src="lib/date.js" type="text/javascript"></script> <script src="lib/date.js" type="text/javascript"></script>
<script src="lib/jquery.cookies.js" type="text/javascript"></script> <script src="lib/jquery.cookies.js" type="text/javascript"></script>

View File

@ -1,69 +0,0 @@
(function(cloudStack) {
cloudStack.sections.accounts = {
title: 'Accounts',
id: 'accounts',
sectionSelect: {
label: 'Select view'
},
sections: {
accounts: {
type: 'select',
title: 'Accounts',
listView: {
id: 'accounts',
fields: {
name: { label: 'Name', editable: true },
domain: { label: 'Domain' },
state: { label: 'State' }
},
filters: {
mine: { label: 'My Accounts' },
all: { label: 'All Accounts' }
},
dataProvider: testData.dataProvider.listView('accounts'),
detailView: {
name: 'Account details',
viewAll: { path: 'accounts.users', label: 'Users' },
tabs: {
details: {
title: 'Details',
fields: [
{
name: { label: 'Name' }
},
{
domain: { label: 'Domain' },
vmlimit: { label: 'VM Limit' },
vmtotal: { label: 'Total VMs' },
iplimit: { label: 'IP Limit' },
iptotal: { label: 'Total IPs' }
}
],
dataProvider: testData.dataProvider.detailView('accounts')
}
}
}
}
},
users: {
type: 'select',
title: 'Users',
listView: {
id: 'users',
fields: {
username: { label: 'Username', editable: true },
email: { label: 'E-mail' },
state: { label: 'State' }
},
filters: {
mine: { label: 'My Accounts' },
all: { label: 'All Accounts' }
},
dataProvider: testData.dataProvider.listView('users')
}
}
}
};
})(cloudStack);

View File

@ -1,113 +0,0 @@
(function(cloudStack, $, testData) {
$.extend(cloudStack, testData, {
home: 'dashboard',
sectionPreFilter: function(args) {
var user = args.context.users[0];
if (user.role == 'admin')
return args.context.sections;
return ['dashboard', 'instances', 'storage', 'templates', 'events', 'projects'];
},
sections: {
dashboard: {},
instances: {},
storage: {},
network: {},
templates: {},
accounts: {},
domains: {},
events: {},
system: {},
projects: {},
'global-settings': {},
configuration: {}
}
});
$(function() {
var $container = $('#cloudStack3-container');
var loginArgs = {
$container: $container,
// Use this for checking the session, to bypass login screen
bypassLoginCheck: function(args) {
var disabledLogin = document.location.href.split('?')[1] == 'login=disabled';
if (disabledLogin)
return {
user: {
login: 'wchan',
name: 'Will Chan',
role: 'admin'
}
};
else
return false;
},
// Actual login process, via form
loginAction: function(args) {
if (args.data.username != 'invalid'){
return args.response.success({
data: {
user: {
username: args.data.username,
name: args.data.name ? args.data.name : args.data.username,
role: args.data.username == 'jdoe' ? 'user' : 'admin'
}
}
});
}
return args.response.error();
},
logoutAction: function(args) {
document.location.reload();
},
complete: function(args) {
var context = {
users: [args.user]
};
var cloudStackArgs = $.extend(cloudStack, {
context: context
});
// Check to invoke install wizard
cloudStack.installWizard.check({
context: context,
response: {
success: function(args) {
if (args.doInstall) {
cloudStack.uiCustom.installWizard({
$container: $container,
context: context,
complete: function() {
$container.cloudStack(cloudStackArgs);
}
});
} else {
// Show cloudStack main UI
$container.cloudStack(cloudStackArgs);
}
}
}
});
// Logout action
$('#user-options a').live('click', function() {
loginArgs.logoutAction({
context: cloudStack.context
});
});
}
};
// Login
cloudStack.uiCustom.login(loginArgs);
});
})(cloudStack, jQuery, testData);

View File

@ -1,547 +0,0 @@
(function(cloudStack, testData, $) {
cloudStack.sections.configuration = {
title: 'Configuration',
id: 'configuration',
sectionSelect: {
label: 'Select Offering'
},
sections: {
serviceOfferings: {
type: 'select',
title: 'Service',
listView: {
label: 'Service Offerings',
fields: {
name: { label: 'Name', editable: true },
storagetype: { label: 'Storage Type' },
cpuspeed: { label: 'CPU' },
memory: { label: 'Memory' },
domain: { label: 'Domain'}
},
actions: {
add: {
label: 'Add service offering',
action: function(args) {
args.response.success();
},
messages: {
confirm: function(args) {
return 'Are you sure you want to add ' + args.name + '?';
},
success: function(args) {
return 'Your new service offering is being created.';
},
notification: function(args) {
return 'Created service offering';
},
complete: function(args) {
return 'Service offering has been created';
}
},
createForm: {
title: 'New service offering',
desc: 'Please fill in the following data to add a new service offering.',
fields: {
name: { label: 'Name', editable: true },
displayText: { label: 'Display Text' },
storageType: {
label: 'Storage Type',
select: [
{ id: 'shared', description: 'Shared' },
{ id: 'local', description: 'Local' }
]
},
cpuCores: { label: '# of CPU cores' },
cpuSpeed: { label: 'CPU Speed (in MHz)'},
memory: { label: 'Memory (in MB)' },
tags: { label: 'Tags' },
offerHA: { label: 'Offer HA', isBoolean: true },
isPublic: { label: 'Public', isBoolean: true }
}
},
notification: {
poll: testData.notifications.testPoll
}
}
},
reorder: {
moveTop: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveBottom: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveUp: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDown: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDrag: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
}
},
dataProvider: function(args) {
setTimeout(function() {
args.response.success({
data: testData.data.serviceOfferings
});
});
}
}
},
systemServiceOfferings: {
type: 'select',
title: 'System Service',
listView: {
label: 'System Service Offerings',
fields: {
name: { label: 'Name', editable: true },
storagetype: { label: 'Storage Type' },
cpuspeed: { label: 'CPU' },
memory: { label: 'Memory' },
domain: { label: 'Domain'}
},
reorder: {
moveTop: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveBottom: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveUp: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDown: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDrag: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
}
},
actions: {
add: {
label: 'Add system service offering',
action: function(args) {
args.response.success();
},
messages: {
confirm: function(args) {
return 'Are you sure you want to add ' + args.name + '?';
},
success: function(args) {
return 'Your new system service offering is being created.';
},
notification: function(args) {
return 'Created system service offering';
},
complete: function(args) {
return 'Sysmte service offering has been created';
}
},
createForm: {
title: 'New system service offering',
desc: 'Please fill in the following data to add a new service offering.',
fields: {
name: { label: 'Name', editable: true },
displayText: { label: 'Display Text' },
storageType: {
label: 'Storage Type',
select: [
{ id: 'shared', description: 'Shared' },
{ id: 'local', description: 'Local' }
]
},
cpuCores: { label: '# of CPU cores' },
cpuSpeed: { label: 'CPU Speed (in MHz)'},
memory: { label: 'Memory (in MB)' },
tags: { label: 'Tags' },
offerHA: { label: 'Offer HA', isBoolean: true },
isPublic: { label: 'Public', isBoolean: true }
}
},
notification: {
poll: testData.notifications.testPoll
}
}
},
dataProvider: function(args) {
setTimeout(function() {
args.response.success({
data: testData.data.systemServiceOfferings
});
});
}
}
},
diskOfferings: {
type: 'select',
title: 'Disk',
listView: {
label: 'Disk Offerings',
fields: {
displaytext: { label: 'Name' },
disksize: { label: 'Disk Size' },
domain: { label: 'Domain'}
},
dataProvider: function(args) {
setTimeout(function() {
args.response.success({
data: testData.data.diskOfferings
});
});
},
reorder: {
moveTop: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveBottom: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveUp: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDown: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDrag: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
}
},
actions: {
add: {
label: 'Add disk offering',
messages: {
confirm: function(args) {
return 'Are you sure you want to add a disk offering?';
},
success: function(args) {
return 'Your new disk offering is being created.';
},
notification: function(args) {
return 'Creating new disk offering';
},
complete: function(args) {
return 'Disk offering has been created successfully!';
}
},
createForm: {
title: 'Add disk offering',
fields: {
name: {
label: 'Name',
validation: { required: true }
},
description: {
label: 'Description',
validation: { required: true }
},
isCustomized: {
label: 'Custom disk size',
isBoolean: true,
isReverse: true,
isChecked: true
},
disksize: {
label: 'Disk size (in GB)',
dependsOn: 'isCustomized',
validation: { required: true, number: true },
isHidden: true
},
tags: {
label: 'Storage tags'
},
isDomainSpecific: {
label: 'Domain specific',
isBoolean: true
},
domainId: {
label: 'Domain',
dependsOn: 'isDomainSpecific',
select: function(args) {
setTimeout(function() {
args.response.success({
descriptionField: 'name',
data: testData.data.domains
});
});
},
isHidden: true
}
}
},
action: function(args) {
args.response.success();
}
}
}
}
},
networkOfferings: {
type: 'select',
title: 'Network',
listView: {
label: 'Network Offerings',
fields: {
name: { label: 'Name', editable: true },
networkrate: { label: 'Network Rate' },
traffictype: { label: 'Traffic Type'}
},
reorder: {
moveTop: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveBottom: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveUp: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDown: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
moveDrag: {
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
}
},
actions: {
add: {
label: 'Add network offering',
action: function(args) {
setTimeout(function() {
args.response.success();
}, 200);
},
createForm: {
title: 'Add network offering',
desc: 'Please specify the network offering',
fields: {
name: { label: 'Name', validation: { required: true } },
displayText: { label: 'Display Text', validation: { required: true } },
maxConnections: { label: 'Max Connections' },
networkRate: { label: 'Network Rate' },
trafficType: {
label: 'Traffic Type', validation: { required: true },
select: function(args) {
args.response.success({
data: [
{ id: 'GUEST', description: 'Guest' }
]
});
}
},
guestType: {
label: 'Guest Type',
select: function(args) {
args.response.success({
data: [
{ id: 'Isolated', description: 'Isolated' },
{ id: 'Shared', description: 'Shared' }
]
});
}
},
availability: {
label: 'Availability',
select: function(args) {
args.response.success({
data: [
{ id: 'Required', description: 'Required' },
{ id: 'Optional', description: 'Optional' },
{ id: 'Unavailable', description: 'Unavailable' }
]
});
}
},
serviceOfferingId: {
label: 'Service Offering',
select: function(args) {
args.response.success({
data: $.map(testData.data.serviceOfferings, function(elem) {
return {
id: elem.id,
description: elem.name
};
})
});
}
},
specifyVlan: { label: 'Specify VLAN', isBoolean: true },
vlanId: { label: 'VLAN ID', isHidden: true, dependsOn: 'specifyVlan'},
supportedServices: {
label: 'Supported Services',
dynamic: function(args) {
setTimeout(function() {
var fields = {};
var services = ['Vpn', 'Dhcp', 'Gateway', 'Firewall', 'Lb', 'UserData', 'SourceNat', 'StaticNat', 'PortForwarding', 'SecurityGroup'];
$(services).each(function() {
var id = {
isEnabled: this + '.' + 'isEnabled',
capabilities: this + '.' + 'capabilities',
provider: this + '.' + 'provider'
};
fields[id.isEnabled] = { label: this, isBoolean: true };
fields[id.provider] = {
label: this + ' Provider',
isHidden: true,
dependsOn: id.isEnabled,
select: function(args) {
args.response.success({
data: [
{ id: 'NetScaler', description: 'NetScaler'},
{ id: 'SRX', description: 'SRX' }
]
});
}
};
});
args.response.success({
fields: fields
});
}, 50);
}
},
tags: { label: 'Tags' }
}
},
notification: {
poll: testData.notifications.testPoll
},
messages: {
notification: function(args) {
return 'Added network offering';
}
}
}
},
dataProvider: function(args) {
setTimeout(function() {
args.response.success({
data: testData.data.networkOfferings
});
});
}
}
}
}
};
})(cloudStack, testData, jQuery);

View File

@ -1,105 +0,0 @@
(function(cloudStack, testData) {
// Admin dashboard
cloudStack.sections.dashboard = {
title: 'Dashboard',
show: cloudStack.uiCustom.dashboard,
adminCheck: function(args) {
return args.context.users[0].role == 'admin';
},
user: {
dataProvider: function(args) {
args.response.success({
data: {
runningInstances: 10,
stoppedInstances: 2,
totalInstances: 12,
accountID: '12',
accountName: 'brian',
userName: 'brian',
accountType: 'user',
accountDomainID: 12
}
});
}
},
admin: {
dataProvider: function(args) {
args.response.success({
data: {
publicIPAllocated: 50,
publicIPTotal: 100,
publicIPPercentage: 50,
privateIPAllocated: 50,
privateIPTotal: 100,
privateIPPercentage: (100 / 50) * 10,
memoryAllocated: 256,
memoryTotal: 1024,
memoryPercentage: (1024 / 256) * 10,
cpuAllocated: 500,
cpuTotal: 1200,
cpuPercentage: (1200 / 500) * 10,
zoneCapacities: [
{
type: 'Public IP',
zoneName: 'zone',
percent: 50,
total: 4,
used: 2
},
{
type: 'Reserved System IP',
zoneName: 'zone',
percent: 50,
total: 10,
used: 40
},
{
type: 'Storage Used',
zoneName: 'zone',
percent: 10,
total: '50 GB',
used: '15 GB'
},
{
type: 'Secondary Storage',
zoneName: 'zone',
percent: 10,
total: '50 GB',
used: '15 GB'
},
{
type: 'Domain Router',
zoneName: 'zone',
percent: 25,
total: 30,
used: 100
},
{
type: 'Host',
zoneName: 'zone',
percent: 15,
total: '15.5 gHZ',
used: '100 gHZ'
}
],
alerts: $.map(testData.data.alerts, function(alert) {
return {
name: 'System Alert',
description: alert.description
};
}),
hostAlerts: $.map(testData.data.alerts, function(alert) {
return {
name: 'Host Alert',
description: alert.description
};
})
}
});
}
}
};
})(cloudStack, testData);

View File

@ -1,156 +0,0 @@
(function(cloudStack) {
cloudStack.sections.domains = {
title: 'Domains',
id: 'domains',
// Domain tree
treeView: {
// Details
detailView: {
name: 'Domain details',
viewAll: {
label: 'Accounts',
path: 'accounts.accounts'
},
// Detail actions
actions: {
// Destroy
destroy: {
label: 'Remove domain',
messages: {
confirm: function(args) {
return 'Are you sure you want to destroy this domain?';
},
notification: function(args) {
return 'Removed domain: ' + args.name;
}
},
action: function(args) {
setTimeout(function() {
args.response.success();
}, 200);
},
notification: {
poll: testData.notifications.testPoll
}
},
// Edit domain
edit: {
label: 'Edit domain details',
messages: {
notification: function(args) {
return 'Edited domain: ' + args.name;
}
},
action: function(args) {
setTimeout(function() {
args.response.success();
}, 200);
}
},
// Add domain
create: {
label: 'Add domain',
action: function(args) {
args.response.success();
},
messages: {
notification: function(args) {
return 'Created domain';
}
},
createForm: {
title: 'Add subdomain',
desc: 'Please specify the domain you want to create.',
fields: {
name: {
label: 'Name',
validation: { required: true }
},
parent: {
label: 'Parent Domain',
validation: { required: true }
}
}
}
}
},
tabs: {
details: {
title: 'Details',
fields: [
{
name: { label: 'Name', isEditable: true }
},
{
accounts: { label: 'Accounts' },
instances: { label: 'Instances' },
volumes: { label: 'Volumes' }
}
],
dataProvider: function(args) {
args.response.success({
data: {
name: 'Domain name',
accounts: 12,
volumes: 23
}
});
}
},
adminAccounts: {
title: 'Admin Accounts',
multiple: true,
fields: [
{
name: { label: 'Name' },
vmtotal: { label: 'VMs' },
iptotal: { label: 'IPs' },
receivedbytes: { label: 'Bytes received' },
sentbytes: { label: 'Bytes sent' },
state: { label: 'State' }
}
],
dataProvider: function(args) {
args.response.success({
data: $.grep(testData.data.accounts, function(item, index) {
return item.domain === 'ROOT' && index <= 5;
})
});
}
},
resourceLimits: {
title: 'Resource Limits',
fields: {
vmlimit: { label: 'Instance Limit' },
iplimit: { label: 'Public IP Limit' },
volumelimit: { label: 'Volume Limit' },
snapshotlimit: { label: 'Snapshot Limit' },
templatelimit: { label: 'Template Limit' }
},
dataProvider: function(args) {
args.response.success({
data: testData.data.accounts[4]
});
}
}
}
},
labelField: 'name',
dataProvider: function(args) {
args.response.success({
data: [
{ id: 'domainA', name: 'Domain A' },
{ id: 'domainB', name: 'Domain B' }
]
});
}
}
};
})(cloudStack);

View File

@ -1,64 +0,0 @@
(function(cloudStack) {
cloudStack.sections.events = {
title: 'Events',
id: 'events',
sectionSelect: {
preFilter: function(args) {
var user = args.context.users[0];
if (user.role == 'admin')
return args.context.sections;
return ['events'];
},
label: 'Select view'
},
sections: {
events: {
type: 'select',
title: 'Events',
listView: {
id: 'events',
label: 'Events',
fields: {
type: { label: 'Type' },
description: { label: 'Description' },
username: { label: 'Initiated By' },
created: { label: 'Date' }
},
dataProvider: testData.dataProvider.listView('events')
}
},
alerts: {
type: 'select',
title: 'Alerts',
listView: {
id: 'alerts',
label: 'Alerts',
fields: {
type: { label: 'Type' },
description: { label: 'Description' },
sent: { label: 'Date' }
},
dataProvider: testData.dataProvider.listView('alerts'),
detailView: {
name: 'Alert details',
tabs: {
details: {
title: 'Details',
fields: [
{
type: { label: 'Type' },
description: { label: 'Description' },
created: { label: 'Sent' }
}
],
dataProvider: testData.dataProvider.detailView('alerts')
}
}
}
}
}
}
};
})(cloudStack);

View File

@ -1,26 +0,0 @@
(function(cloudStack) {
cloudStack.sections['global-settings'] = {
title: 'Global Settings',
id: 'global-settings',
listView: {
label: 'Global Settings',
actions: {
edit: {
label: 'Change value',
action: function(args) {
args.response.success();
},
notification: {
poll: testData.notifications.testPoll
}
}
},
fields: {
name: { label: 'Name', id: true },
description: { label: 'Description' },
value: { label: 'Value', editable: true }
},
dataProvider: testData.dataProvider.listView('globalSettings')
}
};
})(cloudStack);

View File

@ -1,287 +0,0 @@
(function($, cloudStack, testData) {
cloudStack.installWizard = {
// Check if install wizard should be invoked
check: function(args) {
args.response.success({
doInstall: args.context.users[0].username == 'newuser'
});
},
changeUser: function(args) {
setTimeout(function() {
args.response.success({
data: {
newUser: {
username: args.data.username
}
}
});
}, 500);
},
// Copy text
copy: {
// Tooltips
'tooltip.addZone.name': function(args) {
args.response.success({
text: 'A name for the zone.'
});
},
'tooltip.addZone.dns1': function(args) {
args.response.success({
text: 'These are DNS servers for use by guest VMs in the zone. These DNS servers will be accessed via the public network you will add later. The public IP addresses for the zone must have a route to the DNS server named here.'
});
},
'tooltip.addZone.dns2': function(args) {
args.response.success({
text: 'These are DNS servers for use by guest VMs in the zone. These DNS servers will be accessed via the public network you will add later. The public IP addresses for the zone must have a route to the DNS server named here.'
});
},
'tooltip.addZone.internaldns1': function(args) {
args.response.success({
text: 'These are DNS servers for use by system VMs in the zone. These DNS servers will be accessed via the private network interface of the System VMs. The private IP address you provide for the pods must have a route to the DNS server named here.'
});
},
'tooltip.addZone.internaldns2': function(args) {
args.response.success({
text: 'These are DNS servers for use by system VMs in the zone. These DNS servers will be accessed via the private network interface of the System VMs. The private IP address you provide for the pods must have a route to the DNS server named here.'
});
},
'tooltip.addGuestNetwork.name': function(args) {
args.response.success({
text: 'A name for your network'
});
},
'tooltip.addGuestNetwork.description': function(args) {
args.response.success({
text: 'A description for your network'
});
},
'tooltip.addGuestNetwork.guestGateway': function(args) {
args.response.success({
text: 'The gateway that the guests should use'
});
},
'tooltip.addGuestNetwork.guestNetmask': function(args) {
args.response.success({
text: 'The netmask in use on the subnet that the guests should use'
});
},
'tooltip.addGuestNetwork.guestStartIp': function(args) {
args.response.success({
text: 'The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR.'
});
},
'tooltip.addGuestNetwork.guestEndIp': function(args) {
args.response.success({
text: 'The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR.'
});
},
'tooltip.addPod.name': function(args) {
args.response.success({
text: 'A name for the pod'
});
},
'tooltip.addPod.gateway': function(args) {
args.response.success({
text: 'The gateway for the hosts in that pod.'
});
},
'tooltip.addPod.netmask': function(args) {
args.response.success({
text: 'The netmask in use on the subnet the guests will use.'
});
},
'tooltip.addPod.startip': function(args) {
args.response.success({
text: 'This is the IP range in the private network that the CloudStack uses to manage Secondary Storage VMs and Console Proxy VMs. These IP addresses are taken from the same subnet as computing servers.'
});
},
'tooltip.addPod.endip': function(args) {
args.response.success({
text: 'This is the IP range in the private network that the CloudStack uses to manage Secondary Storage VMs and Console Proxy VMs. These IP addresses are taken from the same subnet as computing servers.'
});
},
'tooltip.addCluster.name': function(args) {
args.response.success({
text: 'A name for the cluster. This can be text of your choosing and is not used by CloudStack.'
});
},
'tooltip.addHost.hostname': function(args) {
args.response.success({
text: 'The DNS name or IP address of the host.'
});
},
'tooltip.addHost.username': function(args) {
args.response.success({
text: 'Usually root.'
});
},
'tooltip.addHost.password': function(args) {
args.response.success({
text: 'This is the password for the user named above (from your XenServer install).'
});
},
'tooltip.addPrimaryStorage.name': function(args) {
args.response.success({
text: 'The name for the storage device.'
});
},
'tooltip.addPrimaryStorage.server': function(args) {
args.response.success({
text: '(for NFS, iSCSI, or PreSetup) The IP address or DNS name of the storage device.'
});
},
'tooltip.addPrimaryStorage.path': function(args) {
args.response.success({
text: '(for NFS) In NFS this is the exported path from the server. Path (for SharedMountPoint). With KVM this is the path on each host that is where this primary storage is mounted. For example, "/mnt/primary".'
});
},
'tooltip.addSecondaryStorage.nfsServer': function(args) {
args.response.success({
text: 'The IP address of the NFS server hosting the secondary storage'
});
},
'tooltip.addSecondaryStorage.path': function(args) {
args.response.success({
text: 'The exported path, located on the server you specified above'
});
},
// Intro text
whatIsCloudStack: function(args) {
args.response.success({
text: 'CloudStack&#8482 is a software platform that pools computing resources to build public, private, and hybrid Infrastructure as a Service (IaaS) clouds. CloudStack&#8482 manages the network, storage, and compute nodes that make up a cloud infrastructure. Use CloudStack&#8482 to deploy, manage, and configure cloud computing environments.<br/><br/>Extending beyond individual virtual machine images running on commodity hardware, CloudStack&#8482 provides a turnkey cloud infrastructure software stack for delivering virtual datacenters as a service - delivering all of the essential components to build, deploy, and manage multi-tier and multi-tenant cloud applications. Both open-source and Premium versions are available, with the open-source version offering nearly identical features. '
});
},
whatIsAZone: function(args) {
args.response.success({
text: 'A zone is the largest organizational unit within a CloudStack&#8482; deployment. A zone typically corresponds to a single datacenter, although it is permissible to have multiple zones in a datacenter. The benefit of organizing infrastructure into zones is to provide physical isolation and redundancy. For example, each zone can have its own power supply and network uplink, and the zones can be widely separated geographically (though this is not required).'
});
},
whatIsAPod: function(args) {
args.response.success({
text: 'A pod often represents a single rack. Hosts in the same pod are in the same subnet.<br/><br/>A pod is the second-largest organizational unit within a CloudStack&#8482; deployment. Pods are contained within zones. Each zone can contain one or more pods; in the Basic Installation, you will have just one pod in your zone'
});
},
whatIsACluster: function(args) {
args.response.success({
text: 'A cluster provides a way to group hosts. The hosts in a cluster all have identical hardware, run the same hypervisor, are on the same subnet, and access the same shared storage. Virtual machine instances (VMs) can be live-migrated from one host to another within the same cluster, without interrupting service to the user. A cluster is the third-largest organizational unit within a CloudStack&#8482; deployment. Clusters are contained within pods, and pods are contained within zones.<br/><br/>CloudStack&#8482; allows multiple clusters in a cloud deployment, but for a Basic Installation, we only need one cluster. '
});
},
whatIsAHost: function(args) {
args.response.success({
text: 'A host is a single computer. Hosts provide the computing resources that run the guest virtual machines. Each host has hypervisor software installed on it to manage the guest VMs (except for bare metal hosts, which are a special case discussed in the Advanced Installation Guide). For example, a Linux KVM-enabled server, a Citrix XenServer server, and an ESXi server are hosts. In a Basic Installation, we use a single host running XenServer.<br/><br/>The host is the smallest organizational unit within a CloudStack&#8482; deployment. Hosts are contained within clusters, clusters are contained within pods, and pods are contained within zones. '
});
},
whatIsPrimaryStorage: function(args) {
args.response.success({
text: 'A CloudStack&#8482; cloud infrastructure makes use of two types of storage: primary storage and secondary storage. Both of these can be iSCSI or NFS servers, or localdisk.<br/><br/><strong>Primary storage</strong> is associated with a cluster, and it stores the disk volumes of each guest VM for all the VMs running on hosts in that cluster. The primary storage server is typically located close to the hosts. '
});
},
whatIsSecondaryStorage: function(args) {
args.response.success({
text: 'Secondary storage is associated with a zone, and it stores the following:<ul><li>Templates - OS images that can be used to boot VMs and can include additional configuration information, such as installed applications</li><li>ISO images - OS images that can be bootable or non-bootable</li><li>Disk volume snapshots - saved copies of VM data which can be used for data recovery or to create new templates</ul>'
});
}
},
action: function(args) {
var complete = args.response.success;
var error = args.response.error;
var message = args.response.message;
var startFn = args.startFn;
var createZone = function(args) {
message('Creating zone');
setTimeout(function() {
createPod();
}, 500);
};
var createPod = function(args) {
message('Creating pod');
setTimeout(function() {
createIPRange();
}, 500);
};
var createIPRange = function(args) {
message('Creating network');
setTimeout(function() {
createCluster();
}, 500);
};
var createCluster = function(args) {
message('Creating cluster');
setTimeout(function() {
createHost();
//error('addCluster', 'Could not create cluster.', createPod);
}, 500);
};
var createHost = function(args) {
message('Creating host');
setTimeout(function() {
createPrimaryStorage();
}, 500);
};
var createPrimaryStorage = function(args) {
message('Creating primary storage');
setTimeout(function() {
createSecondaryStorage();
}, 500);
};
var createSecondaryStorage = function(args) {
message('Creating secondary storage');
setTimeout(function() {
pollSystemVMs();
}, 500);
};
var pollSystemVMs = function() {
message('Creating system VMs (this may take a while)');
setTimeout(complete, 5000);
};
if (startFn) {
startFn();
} else {
createZone();
}
}
};
}(jQuery, cloudStack, testData));

View File

@ -1,497 +0,0 @@
(function($, cloudStack) {
cloudStack.sections.instances = {
title: 'Instances',
id: 'instances',
listView: {
section: 'instances',
filters: {
mine: { label: 'My instances' },
all: { label: 'All instances' },
running: { label: 'Running instances' },
destroyed: { label: 'Destroyed instances' }
},
fields: {
name: { label: 'Name', editable: true },
account: { label: 'Account' },
zonename: { label: 'Zone' },
state: {
label: 'Status',
indicator: {
'Running': 'on',
'Stopped': 'off',
'Destroyed': 'off'
}
}
},
// List view actions
actions: {
// Add instance wizard
add: {
label: 'Add instance',
action: {
custom: cloudStack.instanceWizard({
steps: [
// Step 1: Setup
function(args) {
args.response.success({
data: {
zones: testData.data.zones
}
});
},
// Step 2: Select template
function(args) {
args.response.success({
hypervisor: {
idField: 'id',
nameField: 'displayname'
},
data: {
templates: {
featuredtemplates: $.grep(testData.data.isos, function(elem) {
return elem.isfeatured === true;
}),
communitytemplates: [],
mytemplates: $.grep(testData.data.isos, function(elem) {
return elem.isfeatured === true;
}),
isos: $.grep(testData.data.isos, function(elem) {
return elem.isfeatured === false;
})
},
hypervisors: [
{ id: 123, displayname: 'KVM' },
{ id: 124, displayname: 'Xen' },
{ id: 125, displayname: 'VMWare' }
]
}
});
},
// Step 3: Service offering
function(args) {
args.response.success({
data: {
serviceOfferings: testData.data.serviceOfferings
}
});
},
// Step 4: Data disk offering
function(args) {
args.response.success({
required: true,
customFlag: 'iscustomized', // Field determines if custom slider is shown
data: {
diskOfferings: testData.data.diskOfferings
}
});
},
// Step 5: Network
function(args) {
args.response.success({
type: 'select-network',
data: {
myNetworks: $.grep(testData.data.networks, function(elem) {
return elem.isdefault === true;
}),
sharedNetworks: $.grep(testData.data.networks, function(elem) {
return elem.isdefault === false;
}),
securityGroups: testData.data.securityGroups,
networkOfferings: testData.data.networkOfferings
}
});
},
// Step 6: Review
function(args) {
args.response.success({});
}
],
action: function(args) {
args.response.success({
_custom: { jobID: 12345 }
});
}
})
},
messages: {
confirm: function(args) {
return 'Are you sure you want to add ' + args.name + '?';
},
notification: function(args) {
return 'Creating new VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.customPoll(
testData.data.instances[1]
)
}
},
edit: {
label: 'Edit instance name',
action: function(args) {
if ((args.data.name) == '') {
args.response.error({ message: 'Instance name cannot be blank.' });
} else {
args.response.success();
}
}
},
restart: {
label: 'Restart instance',
action: function(args) {
setTimeout(function() {
args.response.success({
data: {
state: 'Restarting'
}
});
}, 1000);
},
messages: {
confirm: function(args) {
return 'Are you sure you want to restart ' + args.name + '?';
},
notification: function(args) {
return 'Rebooting VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.customPoll({
state: 'Running'
})
}
},
stop: {
label: 'Stop instance',
action: function(args) {
setTimeout(function() {
args.response.success({
data: { state: 'Stopping' }
});
}, 500);
},
messages: {
confirm: function(args) {
return 'Are you sure you want to shutdown ' + args.name + '?';
},
notification: function(args) {
return 'Rebooting VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.customPoll({
state: 'Stopped'
})
}
},
start: {
label: 'Start instance',
action: function(args) {
setTimeout(function() {
args.response.success({
data: { state: 'Starting' }
});
}, 500);
},
messages: {
confirm: function(args) {
return 'Are you sure you want to start ' + args.name + '?';
},
notification: function(args) {
return 'Starting VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.customPoll({
state: 'Running'
})
}
},
destroy: {
label: 'Destroy instance',
messages: {
confirm: function(args) {
return 'Are you sure you want to destroy ' + args.name + '?';
},
notification: function(args) {
return 'Destroyed VM: ' + args.name;
}
},
action: function(args) {
setTimeout(function() {
args.response.success({ data: { state: 'Destroying' }});
}, 200);
},
notification: {
poll: testData.notifications.customPoll({
state: 'Destroyed'
})
}
}
},
dataProvider: testData.dataProvider.listView('instances'),
detailView: {
name: 'Instance details',
viewAll: { path: 'storage.volumes', label: 'Volumes' },
// Detail view actions
actions: {
edit: {
label: 'Edit VM details', action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
},
notification: {
poll: testData.notifications.testPoll
}
},
viewConsole: {
label: 'View VM console',
action: {
externalLink: {
url: function(args) {
return 'http://localhost:8080/client/console?cmd=access&vm=' +
args.context.instances[0].id;
},
title: function(args) {
return args.context.instances[0].displayname + ' console';
},
width: 800,
height: 600
}
}
},
stop: {
label: 'Stop VM',
messages: {
confirm: function(args) {
return 'Are you sure you want to stop ' + args.name + '?';
},
notification: function(args) {
return 'Stopping VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.customPoll({
state: 'Stopped'
})
},
action: function(args) {
setTimeout(function() {
args.response.success({
_custom: { jobID: args.data.id }
});
}, 1000);
}
},
start: {
label: 'Start VM',
messages: {
confirm: function(args) {
return 'Are you sure you want to start ' + args.name + '?';
},
notification: function(args) {
return 'Starting VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.customPoll({
state: 'Running'
})
},
action: function(args) {
setTimeout(function() {
args.response.success({
_custom: { jobID: args.data.id }
});
}, 1000);
}
},
restart: {
label: 'Restart VM',
messages: {
confirm: function(args) {
return 'Are you sure you want to restart ' + args.name + '?';
},
notification: function(args) {
return 'Rebooting VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.testPoll
},
action: function(args) {
setTimeout(function() {
args.response.success({
_custom: { jobID: args.data.id }
});
}, 1000);
}
},
destroy: {
label: 'Destroy VM',
messages: {
confirm: function(args) {
return 'Are you sure you want to destroy ' + args.name + '?';
},
notification: function(args) {
return 'Destroying VM: ' + args.name;
}
},
notification: {
poll: testData.notifications.customPoll({
state: 'Destroyed'
})
},
action: function(args) {
setTimeout(function() {
args.response.success();
}, 1000);
}
},
migrate: {
notification: {
desc: 'Migrated VM',
poll: testData.notifications.testPoll
},
label: 'Migrate VM', action: function(args) {
args.response.success();
}
},
attachISO: {
label: 'Attach ISO', action: function(args) {
args.response.success();
}
},
resetPassword: {
label: 'Reset password',
preAction: function(args) {
cloudStack.dialog.notice({
message: 'You cannot reset your password.'
});
return false;
},
action: function(args) {
args.response.success({});
},
messages: {
confirm: function(args) {
return 'Do you really want to reset your password?';
},
notification: function(args) {
return 'Resetting VM password';
},
complete: function(args) {
return 'VM password reset. New password is: ' + args.password;
}
},
notification: {
poll: testData.notifications.customPoll({
password: '1284018jaj#'
})
}
},
changeService: {
label: 'Change Service', action: function(args) {
args.response.success();
}
}
},
tabs: {
// Details tab
details: {
title: 'Details',
fields: [
{
name: {
label: 'Name', isEditable: true
}
},
{
id: { label: 'ID', isEditable: false },
zonename: { label: 'Zone', isEditable: false },
templateid: {
label: 'Template type',
isEditable: true,
select: function(args) {
var items = [];
$(testData.data.templates).each(function() {
items.push({ id: this.id, description: this.name });
});
setTimeout(function() {
args.response.success({ data: items });
}, 500);
}
},
serviceofferingname: { label: 'Service offering', isEditable: false },
group: { label: 'Group', isEditable: true }
}
],
dataProvider: testData.dataProvider.detailView('instances')
},
/**
* NICs tab
*/
nics: {
title: 'NICs',
isMultiple: true,
preFilter: function(args) {
return ['type'];
},
fields: [
{
name: { label: 'Name', header: true },
ipaddress: { label: 'IP Address' },
gateway: { label: 'Default gateway' },
netmask: { label: 'Netmask' },
type: { label: 'Type' }
}
],
dataProvider: function(args) {
setTimeout(function() {
var instance = $.grep(testData.data.instances, function(elem) {
return elem.id == args.id;
});
args.response.success({
data: $.map(instance[0].nic, function(item, index) {
item.name = 'NIC ' + (index + 1);
return item;
})
});
}, 500);
}
},
/**
* Statistics tab
*/
stats: {
title: 'Statistics',
fields: {
cpuspeed: { label: 'Total CPU' },
cpuused: { label: 'CPU Utilized' },
networkkbsread: { label: 'Network Read' },
networkkbswrite: { label: 'Network Write' }
},
dataProvider: testData.dataProvider.detailView('instances')
}
}
}
}
};
})(jQuery, cloudStack);

File diff suppressed because it is too large Load Diff

View File

@ -1,332 +0,0 @@
(function($, cloudStack, testData) {
cloudStack.projects = {
requireInvitation: function(args) {
return cloudStack.context.users[0].username == 'jdoe';
},
dashboard: function(args) {
var dataFns = {
instances: function(data) {
dataFns.storage($.extend(data, {
runningInstances: 40,
stoppedInstances: 10,
totalInstances: 50
}));
},
storage: function(data) {
dataFns.bandwidth($.extend(data, {
totalVolumes: 70
}));
},
bandwidth: function(data) {
dataFns.ipAddresses($.extend(data, {
totalBandwidth: 1500
}));
},
ipAddresses: function(data) {
dataFns.loadBalancingRules($.extend(data, {
totalIPAddresses: 20
}));
},
loadBalancingRules: function(data) {
dataFns.portForwardingRules($.extend(data, {
totalLoadBalancers: 12
}));
},
portForwardingRules: function(data) {
dataFns.users($.extend(data, {
totalPortForwards: 30
}));
},
users: function(data) {
dataFns.events($.extend(data, {
users: $.map(testData.data.users, function(user) {
return {
account: user.account
};
})
}));
},
events: function(data) {
complete($.extend(data, {
events: $.map(testData.data.events, function(event) {
return {
date: event.created.substr(5, 2) +
'/' + event.created.substr(8, 2) +
'/' + event.created.substr(2, 2),
desc: event.description
};
})
}));
}
};
var complete = function(data) {
args.response.success({
data: data
});
};
dataFns.instances({});
},
resourceManagement: {
update: function(args) {
args.response.success();
},
dataProvider: function(args) {
args.response.success({
data: $.map(
testData.data.projectResourceLimits,
function(resource) {
var resourceMap = {
0: {
id: 'user_vm',
label: 'Max. User VMs'
},
1: {
id: 'public_ip',
label: 'Max. Public IPs'
},
2: {
id: 'volume',
label: 'Max. Volumes'
},
3: {
id: 'snapshot',
label: 'Max. Snapshots'
},
4: {
id: 'template',
label: 'Max. Templates'
},
5: {
id: 'project',
label: 'Max. Projects'
}
};
return {
id: resourceMap[resource.resourcetype].id,
label: resourceMap[resource.resourcetype].label,
type: resource.resourcetype,
value: resource.max
};
}
)
});
}
},
add: function(args) {
setTimeout(function() {
args.response.success({
data: {
name: args.data['project-name'],
displayText: args.data['project-display-text'],
users: []
}
});
}, 1000);
},
inviteForm: {
noSelect: true,
fields: {
'email': { edit: true, label: 'E-mail' },
'add-user': { addButton: true, label: '' }
},
add: {
label: 'Invite',
action: function(args) {
setTimeout(function() {
args.response.success({
data: args.data,
notification: {
label: 'Invited user to project',
poll: testData.notifications.testPoll
}
});
}, 100);
}
},
actionPreFilter: function(args) {
if (cloudStack.context.projects &&
cloudStack.context.projects[0] &&
!cloudStack.context.projects[0].isNew) {
return args.context.actions;
}
return ['destroy'];
},
actions: {},
// Project users data provider
dataProvider: function(args) {
var data = cloudStack.context.projects ?
[
{ email: 'brian.federle@citrix.com' },
{ email: 'john.doe@aol.com' },
{ email: 'some.user@gmail.com' }
] : [];
setTimeout(function() {
args.response.success({
data: data
});
}, 100);
}
},
addUserForm: {
noSelect: true,
fields: {
'username': { edit: true, label: 'Account' },
'add-user': { addButton: true, label: '' }
},
add: {
label: 'Add user',
action: function(args) {
setTimeout(function() {
args.response.success({
data: args.data,
notification: {
label: 'Added user to project',
poll: testData.notifications.testPoll
}
});
}, 100);
}
},
actionPreFilter: function(args) {
if (cloudStack.context.projects &&
cloudStack.context.projects[0] &&
!cloudStack.context.projects[0].isNew) {
return args.context.actions;
}
return ['destroy'];
},
actions: {
destroy: {
label: 'Remove user from project',
action: function(args) {
setTimeout(function() {
args.response.success({
notification: {
label: 'Removed user from project',
poll: testData.notifications.testPoll
}
});
}, 500);
}
},
makeOwner: {
label: 'Make user project owner',
action: function(args) {
setTimeout(function() {
args.response.success({
notification: {
label: 'Assigned new owner to project',
poll: testData.notifications.testPoll
}
});
});
}
}
},
// Project users data provider
dataProvider: function(args) {
var data = cloudStack.context.projects ?
cloudStack.context.projects[0].users : [];
setTimeout(function() {
args.response.success({
data: data
});
}, 100);
}
},
// Project listing data provider
dataProvider: function(args) {
var user = args.context.users[0];
setTimeout(function() {
args.response.success({
data: user.username == 'bfederle' ? [] : testData.data.projects
});
}, 200);
}
};
/**
* Projects section -- list view
*/
cloudStack.sections.projects = {
title: 'Projects',
id: 'projects',
listView: {
fields: {
name: { label: 'Project Name' },
displayText: { label: 'Display Text' },
domain: { label: 'Domain' },
account: { label: 'Owner' }
},
dataProvider: testData.dataProvider.listView('projects'),
actions: {
add: {
label: 'New Project',
action: {
custom: function(args) {
$(window).trigger('cloudStack.newProject');
}
},
messages: {
confirm: function(args) {
return 'Are you sure you want to remove ' + args.name + '?';
},
notification: function(args) {
return 'Removed project';
}
},
notification: {
poll: testData.notifications.testPoll
}
},
destroy: {
label: 'Remove project',
action: function(args) {
args.response.success({});
},
messages: {
confirm: function(args) {
return 'Are you sure you want to remove ' + args.name + '?';
},
notification: function(args) {
return 'Removed project';
}
},
notification: {
poll: testData.notifications.testPoll
}
}
}
}
};
} (jQuery, cloudStack, testData));

View File

@ -1,538 +0,0 @@
(function(cloudStack, $, testData) {
cloudStack.sections.storage = {
title: 'Storage',
id: 'storage',
sectionSelect: {
label: 'Select view'
},
sections: {
/**
* Volumes
*/
volumes: {
type: 'select',
title: 'Volumes',
listView: {
id: 'volumes',
label: 'Volumes',
fields: {
name: { label: 'Name', editable: true },
type: { label: 'Type' },
zonename: { label: 'Zone' },
size: { label: 'Size' },
state: {
label: 'Status',
indicator: {
'Ready': 'on'
}
}
},
filters: {
mine: { label: 'My volumes' },
large: { label: 'Large volumes' },
small: { label: 'Small volumes' }
},
// List view actions
actions: {
// Add volume
add: {
label: 'Add volume',
action: function(args) {
args.response.success({
_custom: { jobID: new Date() }
});
},
messages: {
confirm: function(args) {
return 'Are you sure you want to add ' + args.name + '?';
},
notification: function(args) {
return 'Creating new volume';
}
},
createForm: {
title: 'Add volume',
desc: 'Please fill in the following data to add a new volume.',
fields: {
name: {
label: 'Name',
validation: { required: true }
},
availabilityZone: {
label: 'Availability Zone',
select: function(args) {
args.response.success({
descriptionField: 'displayname',
data: [
{ id: 'sanjose', displayname: 'San Jose' },
{ id: 'Chicago', displayname: 'Chicago' }
]
});
}
},
diskOffering: {
label: 'Disk Offering',
dependsOn: 'availabilityZone',
select: function(args) {
/**
* Example to show/hide fields
*
* -Select Pod2 to show conditional fields
* -Select any other field to hide conditional fields
*/
args.$select.change(function() {
var $input = $(this);
var $form = $input.closest('form');
// Note: need to actually select the .form-item div containing the input
var $diskSize = $form.find('.form-item[rel=diskSize]');
$diskSize.hide();
if ($input.val() == 'custom') {
// Note: need to show by setting display=inline-block, not .show()
$diskSize.css('display', 'inline-block');
}
});
args.response.success({
descriptionField: 'description',
data: [
{ id: 'small', description: 'Small Disk, 5GB' },
{ id: 'medium', description: 'Medium Disk, 20GB' },
{ id: 'large', description: 'Large Disk, 100GB' },
{ id: 'custom', description: 'Custom Disk Size' }
]
});
}
},
diskSize: {
label: 'Disk size (in GB)',
validation: { required: true, number: true },
hidden: true
}
}
},
notification: {
poll: testData.notifications.customPoll(
testData.data.storage[0]
)
}
},
edit: {
label: 'Edit volume name',
action: function(args) {
args.response.success(args.data[0]);
}
},
snapshot: {
label: 'Take snapshot',
messages: {
confirm: function(args) {
return 'Please confirm that you want to take a snapshot of ' + args.name;
},
notification: function(args) {
return 'Made snapshot of volume: ' + args.name;
}
},
action: function(args) {
args.response.success({
data: { state: 'Shapshotting' }
});
},
notification: {
poll: testData.notifications.customPoll({
state: 'Ready'
})
}
},
recurringSnapshot: {
label: 'Setup recurring snapshots',
action: {
custom: cloudStack.uiCustom.recurringSnapshots({
desc: 'You can setup recurring snapshot schedules by selecting from the available options below and applying your policy preference.',
dataProvider: function(args) {
setTimeout(function() {
args.response.success({
data: [
{
type: 0,
time: 10,
timezone: 'Pacific/Samoa',
keep: 23
},
{
type: 3,
time: '12:33 AM',
timezone: 'Pacific/Samoa',
keep: 23,
'day-of-month': 31
}
]
});
}, 100);
},
actions: {
add: function(args) {
var snap = args.snapshot;
var data = {
keep: snap.maxsnaps,
timezone: snap.timezone
};
switch (snap['snapshot-type']) {
case 'hourly': // Hourly
$.extend(data, {
type: 0,
time: snap.schedule
}); break;
case 'daily': // Daily
$.extend(data, {
type: 1,
time: snap['time-hour'] + ':' + snap['time-minute'] + ' ' + snap['time-meridiem']
}); break;
case 'weekly': // Weekly
$.extend(data, {
type: 2,
time: snap['time-hour'] + ':' + snap['time-minute'] + ' ' + snap['time-meridiem'],
'day-of-week': snap['day-of-week']
}); break;
case 'monthly': // Monthly
$.extend(data, {
type: 3,
time: snap['time-hour'] + ':' + snap['time-minute'] + ' ' + snap['time-meridiem'],
'day-of-month': snap['day-of-month']
}); break;
}
setTimeout(function() {
args.response.success({
data: data
});
}, 300);
},
remove: function(args) {
args.response.success();
}
},
// Select data
selects: {
schedule: function(args) {
var time = [];
for (var i = 1; i <= 59; i++) {
time.push({
id: i,
name: i
});
}
args.response.success({
data: time
});
},
timezone: function(args) {
args.response.success({
data: [
{
id: 'Etc/GMT+12',
name: '[UTC-12:00] GMT-12:00'
},
{
id: 'Pacific/Samoa',
name: '[UTC-11:00] Samoa Standard Time'
}
]
});
},
'day-of-week': function(args) {
args.response.success({
data: [
{ id: 1, name: 'Sunday' },
{ id: 2, name: 'Monday' },
{ id: 3, name: 'Tuesday' },
{ id: 4, name: 'Wednesday' },
{ id: 5, name: 'Thursday' },
{ id: 6, name: 'Friday' },
{ id: 7, name: 'Saturday' }
]
});
},
'day-of-month': function(args) {
var time = [];
for (var i = 1; i <= 31; i++) {
time.push({
id: i,
name: i
});
}
args.response.success({
data: time
});
},
'time-hour': function(args) {
var time = [];
for (var i = 1; i <= 12; i++) {
time.push({
id: i,
name: i
});
}
args.response.success({
data: time
});
},
'time-minute': function(args) {
var time = [];
for (var i = 0; i <= 59; i++) {
time.push({
id: i < 10 ? '0' + i : i,
name: i < 10 ? '0' + i : i
});
}
args.response.success({
data: time
});
},
'time-meridiem': function(args) {
args.response.success({
data: [
{ id: 'AM', name: 'AM' },
{ id: 'PM', name: 'PM' }
]
});
}
}
})
},
messages: {
notification: function(args) {
return 'Setup recurring snapshot';
}
},
notification: {
poll: testData.notifications.testPoll
}
},
create: {
label: 'Create template',
addRow: 'false',
messages: {
notification: function(args) {
return 'Making new template: ' + args.name;
}
},
action: function(args) {
args.response.success({
data: {
state: 'Templating'
}
});
},
createForm: {
title: 'Create a template',
desc: 'To create a template from the selected volume, please complete the fields below.',
fields: {
name: { label: 'Name' },
displayText: { label: 'Display text' },
'public': {
label: 'Public', isBoolean: true
},
osType: {
label: 'OS Type',
dependsOn: 'public',
hidden: true,
select: function(args) {
args.response.success({
descriptionField: 'description',
data: [
{ id: 'centos53-64', description: 'CentOS 5.3 (64-bit)' },
{ id: 'rhel5-64', description: 'Red Hat Enterprise Linux 5.0 (64-bit)' },
{ id: 'deb6-32', description: 'Debian GNU/Linux 6.0 (32-bit)' }
]
});
}
},
usePassword: {
label: 'Use Password?',
isBoolean: true,
hidden: true,
dependsOn: 'public'
},
password: {
label: 'Password',
hidden: true,
dependsOn: 'usePassword',
password: true
}
}
},
notification: {
poll: testData.notifications.customPoll({
state: 'Ready'
})
}
}
},
dataProvider: testData.dataProvider.listView('storage'),
detailView: {
name: 'Volume details',
viewAll: { path: 'storage.snapshots', label: 'Snapshots' },
actions: {
edit: {
label: 'Edit volume details',
action: function(args) {
setTimeout(function() {
args.response.success();
}, 500);
}
},
snapshot: {
label: 'Take snapshot',
messages: {
confirm: function(args) {
return 'Please confirm that you want to take a snapshot of ' + args.name;
},
notification: function(args) {
return 'Made snapshot of volume: ' + args.name;
}
},
action: function(args) {
args.response.success();
},
notification: {
poll: testData.notifications.testPoll
}
},
createTemplate: {
label: 'Create template',
messages: {
success: function(args) {
return 'Your new template ' + args.name + ' is being created.';
},
notification: function(args) {
return 'Making new template: ' + args.name;
}
},
action: function(args) {
args.response.success();
},
createForm: {
title: 'Create a template',
desc: 'To create a template from the selected volume, please complete the fields below.',
fields: {
name: { label: 'Name', validation: { required: true } },
displayText: { label: 'Display text' },
osType: {
label: 'OS Type',
select: function(args) {
args.response.success({
descriptionField: 'description',
data: [
{ id: 'centos53-64', description: 'CentOS 5.3 (64-bit)' },
{ id: 'rhel5-64', description: 'Red Hat Enterprise Linux 5.0 (64-bit)' },
{ id: 'deb6-32', description: 'Debian GNU/Linux 6.0 (32-bit)' }
]
});
}
},
'public': {
label: 'Public', isBoolean: true
},
usePassword: {
label: 'Use password?', isBoolean: true
}
}
},
notification: {
poll: testData.notifications.testPoll
}
}
},
tabs: {
details: {
title: 'Details',
fields: [
{
name: { label: 'Name', isEditable: true }
},
{
id: { label: 'ID' },
type: { label: 'Type' },
zone: { label: 'Zone' }
}
],
dataProvider: testData.dataProvider.detailView('storage')
}
}
}
}
},
/**
* Snapshots
*/
snapshots: {
type: 'select',
title: 'Snapshots',
listView: {
id: 'snapshots',
label: 'Snapshots',
fields: {
volumename: { label: 'Volume' },
state: { label: 'State' },
intervaltype: { label: 'Interval Type' },
created: { label: 'Date' }
},
filters: {
mine: { label: 'My snapshots' }
},
dataProvider: testData.dataProvider.listView('snapshots'),
detailView: {
name: 'Snapshot detail',
tabs: {
details: {
title: 'Details',
fields: [
{
name: { label: 'Name' }
},
{
id: { label: 'ID' },
volume: { label: 'Volume' },
state: { label: 'State' },
intervalType: { label: 'Interval Type' },
account: { label: 'Account' },
domain: { label: 'Domain' }
}
],
dataProvider: testData.dataProvider.detailView('snapshots')
}
}
}
}
}
}
};
})(cloudStack, jQuery, testData);

File diff suppressed because it is too large Load Diff

View File

@ -1,78 +0,0 @@
(function(cloudStack) {
cloudStack.sections.templates = {
title: 'Templates',
id: 'templates',
sectionSelect: {
label: 'Select view'
},
sections: {
templates: {
type: 'select',
title: 'Templates',
listView: {
id: 'templates',
label: 'Templates',
fields: {
displaytext: { label: 'Name', editable: true },
desc: { label: 'Details' },
zonename: { label: 'Zone' },
hypervisor: { label: 'Hypervisor' }
},
actions: {
// Add template
add: {
label: 'Add template',
action: function(args) {
args.response.success();
},
messages: {
notification: function(args) {
return 'Created template';
}
},
createForm: {
title: 'Add new template',
desc: 'Please enter the following data to create your new template',
fields: {
name: { label: 'Name', validation: { required: true } },
displayText: { label: 'Display Text', validation: { required: true } },
url: { label: 'URL', validation: { required: true } },
passwordEnabled: { label: 'Password', isBoolean: true }
}
},
notification: {
poll: testData.notifications.testPoll
}
},
edit: {
label: 'Edit template name',
action: function(args) {
args.response.success(args.data[0]);
}
}
},
dataProvider: testData.dataProvider.listView('templates')
}
},
isos: {
type: 'select',
title: 'ISOs',
listView: {
label: 'ISOs',
fields: {
displaytext: { label: 'Name' },
desc: { label: 'Details' },
size: { label: 'Size' },
zonename: { label: 'Zone' }
},
dataProvider: testData.dataProvider.listView('isos')
}
}
}
};
})(cloudStack);

File diff suppressed because it is too large Load Diff

View File

@ -1,687 +0,0 @@
(function(cloudStack, $) {
cloudStack.zoneWizard = {
customUI: {
publicTrafficIPRange: function(args) {
var multiEditData = [];
var totalIndex = 0;
return $('<div>').multiEdit({
context: args.context,
noSelect: true,
fields: {
'gateway': { edit: true, label: 'Gateway' },
'netmask': { edit: true, label: 'Netmask' },
'vlanid': { edit: true, label: 'VLAN', isOptional: true },
'startip': { edit: true, label: 'Start IP' },
'endip': { edit: true, label: 'End IP' },
'add-rule': { label: 'Add', addButton: true }
},
add: {
label: 'Add',
action: function(args) {
multiEditData.push($.extend(args.data, {
index: totalIndex
}));
totalIndex++;
args.response.success();
}
},
actions: {
destroy: {
label: 'Remove Rule',
action: function(args) {
multiEditData = $.grep(multiEditData, function(item) {
return item.index != args.context.multiRule[0].index;
});
args.response.success();
}
}
},
dataProvider: function(args) {
args.response.success({
data: multiEditData
});
}
});
}
},
preFilters: {
addPublicNetwork: function(args) {
return args.data['network-model'] == 'Advanced';
},
addNetscalerDevice: function(args) {
return args.data['network-model'] == 'Basic';
},
setupPhysicalNetwork: function(args) {
return args.data['network-model'] == 'Advanced';
}
},
forms: {
zone: {
preFilter: function(args) {
var $form = args.$form;
$form.find('input[name=security-groups-enabled]').change(function() {
if ($(this).is(':checked')) {
$form.find('[rel=networkOfferingIdWithoutSG]').hide();
$form.find('[rel=networkOfferingIdWithSG]').show();
} else {
$form.find('[rel=networkOfferingIdWithoutSG]').show();
$form.find('[rel=networkOfferingIdWithSG]').hide();
}
});
if (args.data['network-model'] == 'Advanced') {
args.$form.find('[rel=security-groups-enabled]').hide();
args.$form.find('[rel=networkOfferingIdWithoutSG]').hide();
args.$form.find('[rel=networkOfferingIdWithSG]').hide();
} else {
args.$form.find('[rel=security-groups-enabled]').show();
args.$form.find('[rel=networkOfferingIdWithoutSG]').show();
args.$form.find('[rel=networkOfferingIdWithSG]').show();
$form.find('input[name=security-groups-enabled]:visible').trigger('change');
}
},
fields: {
name: { label: 'Name', validation: { required: true } },
dns1: { label: 'DNS 1', validation: { required: true } },
dns2: { label: 'DNS 2' },
internaldns1: { label: 'Internal DNS 1', validation: { required: true } },
internaldns2: { label: 'Internal DNS 2' },
networkdomain: { label: 'Network Domain' },
ispublic: { isBoolean: true, label: 'Public' },
domain: {
label: 'Domain',
dependsOn: 'ispublic',
isHidden: true,
select: function(args) {
args.response.success({
data: $.map(testData.data.domains, function(domain) {
return {
id: domain.id,
description: domain.name
};
})
});
}
},
'security-groups-enabled': {
label: 'Security Groups Enabled',
isBoolean: true,
isReverse: true
},
networkOfferingIdWithoutSG: {
label: 'Network Offering',
dependsOn: 'security-groups-enabled',
select: function(args) {
args.response.success({
data: $.map(testData.data.networkOfferings, function(offering) {
return {
id: offering.id,
description: offering.name
};
})
});
}
},
networkOfferingIdWithSG: {
label: 'Network Offering',
isHidden: true,
select: function(args) {
args.response.success({
data: $.map(testData.data.networkOfferings, function(offering) {
return {
id: offering.id,
description: offering.name
};
})
});
}
}
}
},
pod: {
fields: {
name: {
label: 'Pod name',
validation: { required: true }
},
reservedSystemGateway: {
label: 'Reserved system gateway',
validation: { required: true }
},
reservedSystemNetmask: {
label: 'Reserved system netmask',
validation: { required: true }
},
reservedSystemStartIp: {
label: 'Start Reserved system IP',
validation: { required: true }
},
reservedSystemEndIp: {
label: 'End Reserved system IP',
validation: { required: false }
}
}
},
basicPhysicalNetwork: {
fields: {
name: { label: 'Network name', validation: { required: true } },
isStorageEnabled: { isBoolean: true, label: 'Storage traffic enabled' }
}
},
guestTraffic: {
preFilter: function(args) {
var selectedZoneObj = {
networktype: args.data['network-model']
};
if (selectedZoneObj.networktype == "Basic") {
args.$form.find('[rel=vlanRange]').hide();
args.$form.find('[rel=vlanId]').hide();
args.$form.find('[rel=scope]').hide();
args.$form.find('[rel=domainId]').hide();
args.$form.find('[rel=account]').hide();
args.$form.find('[rel=networkdomain]').hide();
args.$form.find('[rel=podId]').show();
} else { // Advanced
args.$form.find('[rel=vlanRange]').show();
args.$form.find('[rel=vlanId]').show();
args.$form.find('[rel=scope]').show();
args.$form.find('[rel=domainId]').show();
args.$form.find('[rel=account]').show();
args.$form.find('[rel=networkdomain]').show();
}
},
fields: {
vlanRange: {
label: 'VLAN Range',
range: ['vlanRangeStart', 'vlanRangeEnd'],
validation: { required: true }
},
name: {
label: 'Name',
validation: { required: true }
},
description: {
label: 'Description',
validation: { required: true }
},
vlanId: {
label: "VLAN ID"
},
scope: {
label: 'Scope',
select: function(args) {
var array1 = [];
var selectedZoneObj = {
securitygroupsenabled: args.context.zones[0]['security-groups-enabled']
};
if(selectedZoneObj.securitygroupsenabled) {
array1.push({id: 'account-specific', description: 'Account'});
}
else {
array1.push({id: 'zone-wide', description: 'All'});
array1.push({id: 'domain-specific', description: 'Domain'});
array1.push({id: 'account-specific', description: 'Account'});
}
args.response.success({ data: array1 });
args.$select.change(function() {
var $form = args.$select.closest('form');
if($(this).val() == "zone-wide") {
$form.find('[rel=domainId]').hide();
$form.find('[rel=account]').hide();
}
else if ($(this).val() == "domain-specific") {
$form.find('[rel=domainId]').show();
$form.find('[rel=account]').hide();
}
else if($(this).val() == "account-specific") {
$form.find('[rel=domainId]').show();
$form.find('[rel=account]').show();
}
});
setTimeout(function() {
args.$select.trigger('change');
});
}
},
domainId: {
label: 'Domain',
select: function(args) {
args.response.success({
data: $.map(testData.data.domains, function(offering) {
return {
id: offering.id,
description: offering.name
};
})
});
}
},
account: { label: 'Account' },
guestGateway: { label: 'Guest gateway' },
guestNetmask: { label: 'Guest netmask' },
guestStartIp: { label: 'Guest start IP' },
guestEndIp: { label: 'Guest end IP' },
networkdomain: { label: 'Network domain' }
}
},
cluster: {
fields: {
hypervisor: {
label: 'Hypervisor',
select: function(args) {
args.response.success({ data:testData.data.hypervisors });
}
},
name: {
label: 'Cluster Name',
validation: { required: true }
},
//hypervisor==VMWare begins here
vCenterHost: {
label: 'vCenter Host',
validation: { required: true }
},
vCenterUsername: {
label: 'vCenter Username',
validation: { required: true }
},
vCenterPassword: {
label: 'vCenter Password',
validation: { required: true },
isPassword: true
},
vCenterDatacenter: {
label: 'vCenter Datacenter',
validation: { required: true }
}
//hypervisor==VMWare ends here
}
},
host: {
preFilter: function(args) {
var selectedClusterObj = {
hypervisortype: args.data.hypervisor
};
var $form = args.$form;
if(selectedClusterObj.hypervisortype == "VMware") {
//$('li[input_group="general"]', $dialogAddHost).hide();
$form.find('[rel=hostname]').hide();
$form.find('[rel=username]').hide();
$form.find('[rel=password]').hide();
//$('li[input_group="vmware"]', $dialogAddHost).show();
$form.find('[rel=vcenterHost]').css('display', 'block');
//$('li[input_group="baremetal"]', $dialogAddHost).hide();
$form.find('[rel=baremetalCpuCores]').hide();
$form.find('[rel=baremetalCpu]').hide();
$form.find('[rel=baremetalMemory]').hide();
$form.find('[rel=baremetalMAC]').hide();
//$('li[input_group="Ovm"]', $dialogAddHost).hide();
$form.find('[rel=agentUsername]').hide();
$form.find('[rel=agentPassword]').hide();
}
else if (selectedClusterObj.hypervisortype == "BareMetal") {
//$('li[input_group="general"]', $dialogAddHost).show();
$form.find('[rel=hostname]').css('display', 'block');
$form.find('[rel=username]').css('display', 'block');
$form.find('[rel=password]').css('display', 'block');
//$('li[input_group="baremetal"]', $dialogAddHost).show();
$form.find('[rel=baremetalCpuCores]').css('display', 'block');
$form.find('[rel=baremetalCpu]').css('display', 'block');
$form.find('[rel=baremetalMemory]').css('display', 'block');
$form.find('[rel=baremetalMAC]').css('display', 'block');
//$('li[input_group="vmware"]', $dialogAddHost).hide();
$form.find('[rel=vcenterHost]').hide();
//$('li[input_group="Ovm"]', $dialogAddHost).hide();
$form.find('[rel=agentUsername]').hide();
$form.find('[rel=agentPassword]').hide();
}
else if (selectedClusterObj.hypervisortype == "Ovm") {
//$('li[input_group="general"]', $dialogAddHost).show();
$form.find('[rel=hostname]').css('display', 'block');
$form.find('[rel=username]').css('display', 'block');
$form.find('[rel=password]').css('display', 'block');
//$('li[input_group="vmware"]', $dialogAddHost).hide();
$form.find('[rel=vcenterHost]').hide();
//$('li[input_group="baremetal"]', $dialogAddHost).hide();
$form.find('[rel=baremetalCpuCores]').hide();
$form.find('[rel=baremetalCpu]').hide();
$form.find('[rel=baremetalMemory]').hide();
$form.find('[rel=baremetalMAC]').hide();
//$('li[input_group="Ovm"]', $dialogAddHost).show();
$form.find('[rel=agentUsername]').css('display', 'block');
$form.find('[rel=agentUsername]').find('input').val("oracle");
$form.find('[rel=agentPassword]').css('display', 'block');
}
else {
//$('li[input_group="general"]', $dialogAddHost).show();
$form.find('[rel=hostname]').css('display', 'block');
$form.find('[rel=username]').css('display', 'block');
$form.find('[rel=password]').css('display', 'block');
//$('li[input_group="vmware"]', $dialogAddHost).hide();
$form.find('[rel=vcenterHost]').hide();
//$('li[input_group="baremetal"]', $dialogAddHost).hide();
$form.find('[rel=baremetalCpuCores]').hide();
$form.find('[rel=baremetalCpu]').hide();
$form.find('[rel=baremetalMemory]').hide();
$form.find('[rel=baremetalMAC]').hide();
//$('li[input_group="Ovm"]', $dialogAddHost).hide();
$form.find('[rel=agentUsername]').hide();
$form.find('[rel=agentPassword]').hide();
}
},
fields: {
hostname: {
label: 'Host name',
validation: { required: true },
isHidden: true
},
username: {
label: 'User name',
validation: { required: true },
isHidden: true
},
password: {
label: 'Password',
validation: { required: true },
isHidden: true,
isPassword: true
},
//input_group="general" ends here
//input_group="VMWare" starts here
vcenterHost: {
label: 'ESX/ESXi Host',
validation: { required: true },
isHidden: true
},
//input_group="VMWare" ends here
//input_group="BareMetal" starts here
baremetalCpuCores: {
label: '# of CPU Cores',
validation: { required: true },
isHidden: true
},
baremetalCpu: {
label: 'CPU (in MHz)',
validation: { required: true },
isHidden: true
},
baremetalMemory: {
label: 'Memory (in MB)',
validation: { required: true },
isHidden: true
},
baremetalMAC: {
label: 'Host MAC',
validation: { required: true },
isHidden: true
},
//input_group="BareMetal" ends here
//input_group="OVM" starts here
agentUsername: {
label: 'Agent Username',
validation: { required: false },
isHidden: true
},
agentPassword: {
label: 'Agent Password',
validation: { required: true },
isHidden: true,
isPassword: true
},
//input_group="OVM" ends here
//always appear (begin)
hosttags: {
label: 'Host tags',
validation: { required: false }
}
//always appear (end)
}
},
primaryStorage: {
preFilter: function(args) {},
fields: {
name: {
label: 'Name',
validation: { required: true }
},
server: {
label: 'Server',
validation: { required: true },
isHidden: true
},
//nfs
path: {
label: 'Path',
validation: { required: true },
isHidden: true
},
//iscsi
iqn: {
label: 'Target IQN',
validation: { required: true },
isHidden: true
},
lun: {
label: 'LUN #',
validation: { required: true },
isHidden: true
},
//vmfs
vCenterDataCenter: {
label: 'vCenter Datacenter',
validation: { required: true },
isHidden: true
},
vCenterDataStore: {
label: 'vCenter Datastore',
validation: { required: true },
isHidden: true
},
//always appear (begin)
storageTags: {
label: 'Storage Tags',
validation: { required: false }
}
//always appear (end)
}
},
secondaryStorage: {
fields: {
nfsServer: {
label: 'NFS Server',
validation: { required: true }
},
path: {
label: 'Path',
validation: { required: true }
}
}
}
},
action: function(args) {
var success = args.response.success;
var error = args.response.error;
var message = args.response.message;
var data = args.data;
var startFn = args.startFn;
var stepFns = {
addZone: function(args) {
message('Creating zone');
var zone = {};
setTimeout(function() {
stepFns.addPhysicalNetworks({
data: $.extend(args.data, {
zone: zone
})
});
}, 300);
},
addPhysicalNetworks: function(args) {
message('Creating physical network(s)');
var physicalNetworks = [];
setTimeout(function() {
stepFns.addPod({
data: $.extend(args.data, {
physicalNetworks: physicalNetworks
})
});
}, 400);
},
addPod: function(args) {
message('Creating pod');
var pod = {};
setTimeout(function() {
return error('addPod', 'System error 500', { fn: 'configurePublicTraffic', args: args });
stepFns.configurePublicTraffic({
data: $.extend(args.data, {
pod: pod
})
});
}, 300);
},
configurePublicTraffic: function(args) {
message('Configuring public traffic');
setTimeout(function() {
stepFns.configureGuestTraffic({
data: args.data
});
}, 200);
},
configureGuestTraffic: function(args) {
message('Configuring guest traffic');
setTimeout(function() {
stepFns.addCluster({
data: args.data
});
}, 200);
},
addCluster: function(args) {
message('Creating cluster');
var cluster = {};
setTimeout(function() {
return error('addCluster', 'System error 500', { fn: 'addHost', args: args });
stepFns.addHost({
data: $.extend(args.data, {
cluster: cluster
})
});
}, 200);
},
addHost: function(args) {
message('Adding host');
var host = {};
setTimeout(function() {
stepFns.addPrimaryStorage({
data: $.extend(args.data, {
host: host
})
});
}, 400);
},
addPrimaryStorage: function(args) {
message('Creating primary storage');
setTimeout(function() {
stepFns.addSecondaryStorage({
data: args.data
});
}, 300);
},
addSecondaryStorage: function(args) {
message('Creating secondary storage');
setTimeout(function() {
complete({
data: data
});
}, 300);
}
};
var complete = function(args) {
message('Zone creation complete!');
success({ data: { zone: { id: '123-4223' }}});
};
if (startFn) {
stepFns[startFn.fn](startFn.args);
} else {
stepFns.addZone({});
}
},
enableZoneAction: function(args) {
setTimeout(function() {
args.response.success();
}, 2000);
}
};
}(cloudStack, jQuery));

View File

@ -1,4 +1,4 @@
(function(cloudStack, testData) { (function(cloudStack) {
var rootDomainId = 1; var rootDomainId = 1;
@ -1005,4 +1005,4 @@
return allowedActions; return allowedActions;
} }
})(cloudStack, testData); })(cloudStack);

View File

@ -1,5 +1,5 @@
(function(cloudStack, $, testData) { (function(cloudStack, $) {
$.extend(window.cloudStack, testData, { $.extend(cloudStack, {
home: 'dashboard', home: 'dashboard',
sectionPreFilter: function(args) { sectionPreFilter: function(args) {
@ -308,4 +308,4 @@
cloudStack.uiCustom.login(loginArgs); cloudStack.uiCustom.login(loginArgs);
}); });
})(cloudStack, jQuery, testData); })(cloudStack, jQuery);

View File

@ -1,4 +1,4 @@
(function(cloudStack, testData, $) { (function(cloudStack, $) {
cloudStack.sections.configuration = { cloudStack.sections.configuration = {
title: 'Configuration', title: 'Configuration',
id: 'configuration', id: 'configuration',
@ -1652,4 +1652,4 @@
return allowedActions; return allowedActions;
}; };
})(cloudStack, testData, jQuery); })(cloudStack, jQuery);

View File

@ -1,4 +1,4 @@
(function($, cloudStack, testData) { (function($, cloudStack) {
// Admin dashboard // Admin dashboard
cloudStack.sections.dashboard = { cloudStack.sections.dashboard = {
title: 'Dashboard', title: 'Dashboard',
@ -265,4 +265,4 @@
} }
} }
}; };
})(jQuery, cloudStack, testData); })(jQuery, cloudStack);

View File

@ -1,4 +1,4 @@
(function(cloudStack, testData) { (function(cloudStack) {
cloudStack.sections.domains = { cloudStack.sections.domains = {
title: 'Domains', title: 'Domains',
id: 'domains', id: 'domains',
@ -181,10 +181,6 @@
validation: { required: false } validation: { required: false }
} }
} }
},
notification: {
poll: testData.notifications.testPoll
} }
} }
}, },
@ -361,4 +357,4 @@
return allowedActions; return allowedActions;
} }
})(cloudStack, testData); })(cloudStack);

View File

@ -1,4 +1,4 @@
(function(cloudStack, testData) { (function(cloudStack) {
cloudStack.sections.events = { cloudStack.sections.events = {
title: 'Events', title: 'Events',
id: 'events', id: 'events',
@ -121,4 +121,4 @@
} }
} }
}; };
})(cloudStack, testData); })(cloudStack);

View File

@ -1,4 +1,4 @@
(function($, cloudStack, testData) { (function($, cloudStack) {
cloudStack.installWizard = { cloudStack.installWizard = {
// Check if install wizard should be invoked // Check if install wizard should be invoked
check: function(args) { check: function(args) {
@ -308,4 +308,4 @@
})); }));
} }
}; };
}(jQuery, cloudStack, testData)); }(jQuery, cloudStack));

View File

@ -1,4 +1,4 @@
(function($, cloudStack, testData) { (function($, cloudStack) {
var zoneObjs, hypervisorObjs, featuredTemplateObjs, communityTemplateObjs, myTemplateObjs, isoObjs, serviceOfferingObjs, diskOfferingObjs, networkOfferingObjs; var zoneObjs, hypervisorObjs, featuredTemplateObjs, communityTemplateObjs, myTemplateObjs, isoObjs, serviceOfferingObjs, diskOfferingObjs, networkOfferingObjs;
var selectedZoneObj, selectedTemplateObj, selectedHypervisor, selectedDiskOfferingObj; var selectedZoneObj, selectedTemplateObj, selectedHypervisor, selectedDiskOfferingObj;
@ -1639,7 +1639,6 @@
networkkbsread: { label: 'Network Read' }, networkkbsread: { label: 'Network Read' },
networkkbswrite: { label: 'Network Write' } networkkbswrite: { label: 'Network Write' }
}, },
//dataProvider: testData.dataProvider.detailView('instances')
dataProvider: function(args) { dataProvider: function(args) {
var jsonObj = args.context.instances[0]; var jsonObj = args.context.instances[0];
args.response.success({ args.response.success({
@ -1717,4 +1716,4 @@
return allowedActions; return allowedActions;
} }
})(jQuery, cloudStack, testData); })(jQuery, cloudStack);

View File

@ -1,4 +1,4 @@
(function(cloudStack, $, testData) { (function(cloudStack, $) {
var ipChangeNotice = function() { var ipChangeNotice = function() {
cloudStack.dialog.confirm({ cloudStack.dialog.confirm({
message: 'Your IP addresses may have changed; would you like to refresh the listing? Note that in this case the details pane will close.', message: 'Your IP addresses may have changed; would you like to refresh the listing? Note that in this case the details pane will close.',
@ -1237,7 +1237,6 @@
} }
], ],
//dataProvider: testData.dataProvider.detailView('network')
dataProvider: function(args) { dataProvider: function(args) {
var items = args.context.ipAddresses; var items = args.context.ipAddresses;
@ -2666,4 +2665,4 @@
} }
} }
}; };
})(cloudStack, jQuery, testData); })(cloudStack, jQuery);

View File

@ -1,4 +1,4 @@
(function(cloudStack, testData) { (function(cloudStack) {
cloudStack.projects = { cloudStack.projects = {
requireInvitation: function(args) { requireInvitation: function(args) {
return window.g_projectsInviteRequired; return window.g_projectsInviteRequired;
@ -578,10 +578,6 @@
notification: function(args) { notification: function(args) {
return 'Removed project'; return 'Removed project';
} }
},
notification: {
poll: testData.notifications.testPoll
} }
}, },
@ -855,4 +851,4 @@
return ['accept', 'decline']; return ['accept', 'decline'];
}; };
} (cloudStack, testData)); } (cloudStack));

View File

@ -1,4 +1,4 @@
(function(cloudStack, testData) { (function(cloudStack) {
var diskofferingObjs, selectedDiskOfferingObj; var diskofferingObjs, selectedDiskOfferingObj;
@ -469,9 +469,6 @@
notification: function(args) { notification: function(args) {
return 'Setup recurring snapshot'; return 'Setup recurring snapshot';
} }
},
notification: {
poll: testData.notifications.testPoll
} }
}, },
@ -1191,4 +1188,4 @@
return allowedActions; return allowedActions;
} }
})(cloudStack, testData); })(cloudStack);

View File

@ -1,4 +1,4 @@
(function($, cloudStack, testData) { (function($, cloudStack) {
var zoneObjs, podObjs, clusterObjs, domainObjs, networkOfferingObjs; var zoneObjs, podObjs, clusterObjs, domainObjs, networkOfferingObjs;
var selectedClusterObj, selectedZoneObj, selectedPublicNetworkObj, selectedManagementNetworkObj, selectedPhysicalNetworkObj, selectedGuestNetworkObj; var selectedClusterObj, selectedZoneObj, selectedPublicNetworkObj, selectedManagementNetworkObj, selectedPhysicalNetworkObj, selectedGuestNetworkObj;
@ -7279,4 +7279,4 @@
} }
}; };
})($, cloudStack, testData); })($, cloudStack);

View File

@ -1,4 +1,4 @@
(function(cloudStack, $, testData) { (function(cloudStack, $) {
cloudStack.sections.templates = { cloudStack.sections.templates = {
title: 'Templates', title: 'Templates',
@ -1304,4 +1304,4 @@
return allowedActions; return allowedActions;
} }
})(cloudStack, jQuery, testData); })(cloudStack, jQuery);

View File

@ -1,4 +1,4 @@
(function($, cloudStack, testData) { (function($, cloudStack) {
var installWizard = function(args) { var installWizard = function(args) {
var context = args.context; var context = args.context;
var $installWizard = $('<div>').addClass('install-wizard'); var $installWizard = $('<div>').addClass('install-wizard');
@ -767,4 +767,4 @@
}; };
cloudStack.uiCustom.installWizard = installWizard; cloudStack.uiCustom.installWizard = installWizard;
}(jQuery, cloudStack, testData)); }(jQuery, cloudStack));