Revision 1b866d9e

b/snf-astakos-app/astakos/im/static/im/css/modules.css
28 28
.top-msg p.title span	                        { border-bottom:2px dotted #fff; padding:0 0 10px 0;}
29 29
.top-msg.active                             	{ display:block;}
30 30
.top-msg +.mainlogo                             { margin-top:-73px;}
31
.top-msg .close                                 { position:absolute; bottom:20px; right:20px; font-size:1.3em; font-weight:bold; border:0 none; color:#fff; text-decoration:none;}
31
.top-msg .close                                 { position:absolute; bottom:20px; right:20px; font-size:1.3em;  border:0 none; color:#fff; text-decoration:none;}
32 32
.top-msg .close:hover                           { color:#000;}
33 33
.top-msg.success                             	{ background-color:#77C596; color: #fff}
34 34
.top-msg.error                              	{ background-color:#EF4F54; color: #fff}
......
357 357
/* quotas-form  */
358 358

  
359 359
.quotas-form fieldset							{ background:url(../images/dots.jpg) repeat-x scroll center bottom transparent; margin-bottom:3em; padding-bottom:3em; position:relative; }
360
.quotas-form fieldset legend					{ color:#55B577; font-size:1.308em; margin-bottom:2em; }
361
.quotas-form .with-checkbox .checkbox-widget	{ margin-top:14px; } 
362
.quotas-form .with-checkbox span.info 			{ bottom:19px; }
360
.quotas-form fieldset legend					{ color:#55B577; font-size:1.154em; margin-bottom:3em; position:relative; }
361
.quotas-form fieldset legend span				{ color:#222; }
362
.quotas-form .with-checkbox .checkbox-widget	{ margin-top:12px; } 
363
.quotas-form .with-checkbox span.info 			{ bottom:22px; }
363 364
.quotas-form .form-row.submit					{ text-align:center; }
364 365
.quotas-form input[type="submit"]				{ margin:15px 0; background-color:#B3B3B3 }
365 366
.quotas-form input[type="submit"]:hover			{ background:#55B577 }
......
371 372
.quotas-form fieldset ul li a					{ display:block; width:82px; height:82px; overflow:hidden; }
372 373
.quotas-form fieldset ul li a:hover	img			{ margin-top:-151px; }
373 374
.quotas-form fieldset ul li a.selected img		{ margin-top:-313px; }
375
.quotas-form fieldset ul li a.selected:focus	{ outline:0 none; }
374 376
.quotas-form p.msg								{ color:#B3B3B3; }
375
.quotas-form fieldset legend 					{ margin-bottom:1em; font-size:1.154em }
376
.quotas-form a.delete							{ position:absolute; right:0; top:0; color:#B3B3B3; }
377
.quotas-form .quota								{ display:none; }
377
.quotas-form a.delete							{ position:absolute; right:0; top:0; color:#B3B3B3; z-index:2 }
378
.quotas-form .group								{ display:none; position:relative; background:url(../images/dots.jpg) repeat-x scroll center bottom; margin-bottom:2em; padding-bottom:2em;}
379
.quotas-form .group fieldset					{ background:transparent; margin-bottom:1em; padding-bottom:1em; }
380
.quotas-form .group fieldset legend				{ margin-bottom:1em; padding-bottom:1em; }
378 381
.quotas-form fieldset ul li.rel+li.rel			{ background:url(../images/quota-related-bg.png) no-repeat left center; }
379
.quotas-form .quota	.with-checkbox input[type="text"] { width:100px; margin:10px 0 0; float:left;}
380
.quotas-form .quota .with-checkbox label		{ position:absolute; left:0; top:0; }
381
.quotas-form .quota .with-checkbox p			{ padding-left:224px; float:left; }
382
.quotas-form .quota .double-checkbox			{ float:left; }
383
.quotas-form .quota .double-checkbox + .double-checkbox label   { display:none; }
384
.quotas-form .quota .double-checkbox + .double-checkbox p		{ padding-left:20px; }
385
.quotas-form .quota .double-checkbox .checkbox-widget			{ position:static; }
386

  
387

  
382
.quotas-form .double-checks label				{ font-size:1.077em; }
383
.quotas-form .double-checks .form-row			{ float:left; margin-right:10px;}
384
.quotas-form .double-checks .with-checkbox .checkbox-widget	{ left:0; }
385
.quotas-form .double-checks .with-checkbox input[type="text"]	{ width:60px; float:left; margin:9px 15px -9px; display:none; padding:6px; }
386
.quotas-form .double-checks .with-checkbox label{ width:auto; float:left; margin-left:35px; }
387
.quotas-form .double-checks .with-checkbox input[type="text"].hideshow	{ display:block; }
388
form.quotas-form legend span.info				{ top:0; bottom:auto; left:250px; }
389
form.quotas-form legend span.info span			{ width:400px; }
390
.quotas-form .with-checkbox+.with-checkbox		{ width:196px; }
391
 
388 392
/* stats */
389 393
.stats ul										{ margin:0; padding:0; list-style:none outside none; }
390 394
.stats ul li 									{ margin:0 0 1em 0; padding:0 0 1em 0; list-style:none outside none; background:url(../images/stats-line.jpg) repeat-x left bottom}
b/snf-astakos-app/astakos/im/static/im/js/common.js
229 229
		$(this).hide();
230 230
	})
231 231
	
232
	// quota form actions
233
	
234
	$('.quotas-form ul li a').click(function(e){
235
		e.preventDefault();
236
		$(this).addClass('selected');
237
		var id = $(this).attr('id');
238
		$('.quotas-form fieldset').each(function() {
239
			if($(this).hasClass(id)) {
240
				$(this).show('slow');
241
			}
242
		}); 	
243
		
244
	});
245
	
246
	$('.quotas-form fieldset .delete').click(function(e){
247
		e.preventDefault();
248
		$(this).parents('fieldset').find('input').val('');
249
		$(this).parents('fieldset').hide('slow');
250
		fieldsetClass = $(this).parents('fieldset').attr('class').replace('quota ', '');
251
		$('.quotas-form ul li a').each(function() {
252
			if($(this).attr('id')==fieldsetClass) {
253
				$(this).removeClass('selected');
254
			}
255
		}); 
256
		 
257
		 
258
	})
259
	
260
	
261 232
	
262 233
});
263 234

  
b/snf-astakos-app/astakos/im/static/im/js/forms.js
7 7
      var $this = $(this);
8 8
      var el = $('<a class="checkbox-widget" href="javascript:void(0)"/>');
9 9
      var form = $this.closest(".form-row");
10
	  var className = $this.attr('class');
10 11

  
11 12
      // add class to identify form rows which contain a checkbox
12 13
      form.addClass("with-checkbox");
......
20 21
                var src = e.srcElement.nodeName;
21 22
                if (src == "LABEL" || src == "label") {
22 23
                    el.toggleClass("checked");
24
					
23 25
                };
26
                if ($this.attr('checked')=='checked') {
27
					($this.removeAttr('checked'))
28
				} else {
29
					$this.attr('checked','checked')
30
				}
24 31
            })
25 32
        }
26 33
      }
......
28 35
      
29 36
      if ($this.attr('checked')) {
30 37
        el.addClass("checked");  
38
        
31 39
      }
32 40

  
41
	  el.addClass(className);	
42
		
33 43
      el.click(function() {
34 44
        el.toggleClass("checked");
35 45
        $this.attr('checked', el.hasClass("checked"));
......
105 115

  
106 116
  };
107 117
})( jQuery );
118

  
b/snf-astakos-app/astakos/im/static/im/js/quotas.js
1
$(document).ready(function() {
2

  
3
	// quota form actions
4
	$('.quotas-form ul li a').click(function(e){
5
		//e.preventDefault();
6
		if ( !$(this).hasClass('selected')){
7
			$(this).addClass('selected');
8
			var id = $(this).attr('id');
9
			$('.quotas-form .group').each(function() {
10
				if( $(this).hasClass(id) ) {
11
					$(this).appendTo('.foo');
12
					$(this).show('slow');
13
					$(this).find('input')[0].focus();
14
				}
15
			});
16
		}   
17
	});
18
	
19
	$('.quotas-form .group .delete').click(function(e){
20
		 
21
		$(this).siblings('fieldset').find('input').val('');
22
		
23
		$(this).siblings('fieldset').find('.checkbox-widget.unlimited').addClass('checked');
24
		$(this).siblings('fieldset').find('.checkbox-widget.limited').removeClass('checked');
25
		$(this).siblings('fieldset').find('input[type="checkbox"].limited').removeAttr('checked');  
26
		$(this).siblings('fieldset').find('input[type="checkbox"].unlimited').attr('checked','checked');  
27
		$(this).siblings('fieldset').find('.double-checks input[type="text"]').removeClass('hideshow');
28
		$(this).parents('.group').appendTo('.not-foo');	
29
		$(this).parents('.group').hide('slow');
30
		groupClass = $(this).parents('.group').attr('class').replace('group ', '');
31
		$('.quotas-form ul li a').each(function() {
32
			if($(this).attr('id')==groupClass) {
33
				$(this).removeClass('selected');
34
			}
35
		}); 
36
		
37
		 
38
		 
39
	});
40
	 
41
		
42
	$('.quotas-form .checkbox-widget.limited').click(function(e){
43
		e.preventDefault();
44
		$(this).siblings('input[type="text"]').toggleClass('hideshow');
45
		$(this).siblings('input[type="text"]').focus();
46
	 	parentdiv = $(this).parents('.form-row').prev('.form-row');
47
	 	parentdiv.find('input[type="checkbox"].unlimited').removeAttr('checked');  
48
	 	parentdiv.find('.checkbox-widget').removeClass('checked');
49
	 		
50
	 	
51
	});
52
	
53
	$('.quotas-form .checkbox-widget.unlimited').click(function(e){
54
		parentdiv = $(this).parents('.form-row').next('.form-row');
55
		parentdiv.find('.checkbox-widget').removeClass('checked');
56
		parentdiv.find('input[type="checkbox"].limited').removeAttr('checked');  
57
		parentdiv.find('input[type="text"]').val('');	
58
		parentdiv.find('input[type="text"]').removeClass('hideshow');	
59
		
60
		
61
	})
62
	
63
});
b/snf-astakos-app/astakos/im/templates/im/astakosgroup_form_demo.html
2 2

  
3 3
{% block page.body %}
4 4
 
5
	 
5
{% block headjs %}
6
	{{ block.super }}	 
7
	<script src="{{ IM_STATIC_URL }}js/quotas.js"></script>	
8
{% endblock %}		
6 9
<form action="" method="post" class="withlabels quotas-form">{% csrf_token %}
10
	 
7 11
    <fieldset>
8
    	<legend>1. CREATE GROUP</legend>
12
    	<legend>
13
    		1. CREATE GROUP
14
			<span class="info"> 
15
		    	<em>more info</em>
16
		    	<span>Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text</span>
17
	    	</span>    		
18
    	</legend>
9 19
    	<div class="form-row">
10 20
    		<p class="clearfix">
11 21
    			<label for="id">ID</label>
......
17 27
		    	</span>
18 28
    		</p>
19 29
    	</div>
20
    	<div class="form-row with-errors ">
30
    	<div class="form-row">
21 31
    		
22 32
    		<p class="clearfix">
23 33
    			<label for="name">Name</label>
......
28 38
			    	<span>Help Text</span>
29 39
		    	</span>
30 40
    		</p>
31
    		<div class="form-error" style="left: 270.1px; top: 21.2px; width: 292px; margin-left: 224px; margin-bottom: 5px;">This field is required.<br></div>
41
    		 
32 42
    	</div>
33 43
    	<div class="form-row">
34 44
    		<p class="clearfix">
......
64 74
		    	</span>
65 75
    		</p>
66 76
    	</div>
67
    	<div class="form-row    with-checkbox">
77
    	<div class="form-row ">
68 78
		     <p class="clearfix ">
69
		        <a href="javascript:void(0)" class="checkbox-widget"></a><label for="id_moderation_enabled" class="checkbox-label">Moderation enabled</label>
79
		        <label for="id_moderation_enabled">Modaration</label>
70 80
		        <input type="checkbox" id="id_moderation_enabled" name="moderation_enabled" autocomplete="off" style="display: none;">
71 81
		        <span class="extra-img">&nbsp;</span>
72 82
	          	<span class="info"> 
......
75 85
			    </span>
76 86
		     </p>
77 87
		</div>
88
		<div class="double-checks">
89
    		<label>Max users per group</label>
90
    		<div class="form-row">
91
    			<p class="clearfix">
92
    				<label for="vm_per_user_unlimited">Unlimited</label>
93
    				<input type="checkbox" id="vm_per_user_unlimited" name="vm_per_user_unlimited" class="unlimited" checked="checked">
94
    			</p>
95
    		</div>
96
    		<div class="form-row">
97
    			<p class="clearfix">
98
    				<label for="vm_per_user_limited">Limited</label>
99
    				<input type="checkbox" id="vm_per_user_limited" name="vm_per_user_limited" class="limited">
100
       				<input type="text" id="vm_user_limited_num"/>
101
       				 
102
    			</p>
103
    		</div>
104
    		
105
    	</div> 
78 106
    </fieldset>       
79
    <fieldset>
80
    	<legend>2. CHOOSE RESOURCES</legend>
107
    <fieldset id="icons">
108
    	<legend>
109
    		2. CHOOSE RESOURCES
110
    		<span class="info"> 
111
		    	<em>more info</em>
112
		    	<span>Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text Help Text</span>
113
	    	</span>    
114
    	</legend>
115
    	{% for key in groups.items %}
116
    		{% endfor %}
117
    	
81 118
    	<ul class="clearfix">
82
    		<li><a href="#" id="vm">VM</a></li>
83
    		<li><a href="#" id="storage">STORAGE</a></li>
84
    		<li class="rel"><a href="#" id="cpu">CPU</a></li>
85
    		<li class="rel"><a href="#" id="ram">RAM</a></li>
86
    		<li class="rel"><a href="#" id="diskspace">DISKSPACE</a></li>
119
    		
120
    		<li><a href="#vm_1" id="vm_1"><img src="/static/im/images/create-resource-vm.png" alt="vm"/></a></li>
121
    		<li><a href="#storage_1" id="storage_1"><img src="/static/im/images/create-resource-storage.png" alt="storage"/></a></li>
87 122
    	</ul>
88 123
    	<p class="msg">if you choose CPU without selecting any VMs you must also select RAM and DISKSPACE</p>
89
    </fieldset>   
90
    <fieldset class="quota vm">
91
    	<a href="#" class="delete"><strong>X</strong> remove resource</a>
92
    	<legend>VM</legend>
93
    	<div class="form-row">
94
    		<p class="clearfix">
95
    			<label for="num_vms">Total VM</label>
96
    			<input type="text" name="num_vms">
97
    			<span class="extra-img">&nbsp;</span>
98
         		<span class="info"> 
99
			    	<em>more info</em>
100
			    	<span>Help Text</span>
101
		    	</span>
102
    		</p>
103
    	</div>
104
    </fieldset>
105
    <fieldset class="quota storage">
106
    	<a href="#" class="delete"><strong>X</strong> remove resource</a>
107
    	<legend>STORAGE</legend>
108
    	<div class="form-row">
109
    		<p class="clearfix">
110
    			<label for="num_vms">Total storage</label>
111
    			<input type="text" name="num_vms">
112
    			<span class="extra-img">&nbsp;</span>
113
         		<span class="info"> 
114
			    	<em>more info</em>
115
			    	<span>Help Text</span>
116
		    	</span>
117
    		</p>
118
    	</div>
119
    </fieldset>
120
    <fieldset class="quota cpu">
121
    	<a href="#" class="delete"><strong>X</strong> remove resource</a>
122
    	<legend>CPU</legend>
123
    	<div class="form-row">
124
    		<p class="clearfix">
125
    			<label for="num_vms">Total cpu</label>
126
    			<input type="text" name="num_cpu">
127
    			<span class="extra-img">&nbsp;</span>
128
         		<span class="info"> 
129
			    	<em>more info</em>
130
			    	<span>Help Text</span>
131
		    	</span>
132
    		</p>
133
    	</div>
134
    </fieldset>
135
    <fieldset class="quota ram">
136
    	<a href="#" class="delete"><strong>X</strong> remove resource</a>
137
    	<legend>RAM</legend>
138
    	<div class="form-row">
139
    		<p class="clearfix">
140
    			<label for="num_ram">Total ram</label>
141
    			<input type="text" name="num_ram">
142
    			<span class="extra-img">&nbsp;</span>
143
         		<span class="info"> 
144
			    	<em>more info</em>
145
			    	<span>Help Text</span>
146
		    	</span>
147
    		</p>
148
    	</div>
149
    </fieldset>
150
    <fieldset class="quota diskspace">
151
    	<a href="#" class="delete"><strong>X</strong> remove resource</a>
152
    	<legend>DISKSPACE</legend>
153
    	<div class="form-row">
154
    		<p class="clearfix">
155
    			<label for="num_diskspace">Total diskspace</label>
156
    			<input type="text" name="num_diskspace">
157
    			<span class="extra-img">&nbsp;</span>
158
         		<span class="info"> 
159
			    	<em>more info</em>
160
			    	<span>Help Text</span>
161
		    	</span>
162
    		</p>
163
    	</div>
164 124
    </fieldset>
125
    <div class="foo">
126
    	
127
    </div> 
128
    <div class="not-foo">
129
	    <div class="group vm_1">  
130
	    	<a href="#icons" class="delete"><strong>X</strong> remove resource</a>
131
		    <fieldset class="quota vm" style="background:none;">
132
		    	<legend>VM</legend>
133
		    	<div class="form-row">
134
		    		<p class="clearfix">
135
		    			<label for="num_vms">Total VMs</label>
136
		    			<input type="text" name="num_vms">
137
		    			<span class="extra-img">&nbsp;</span>
138
		         		<span class="info"> 
139
					    	<em>more info</em>
140
					    	<span>Help Text</span>
141
				    	</span>
142
		    		</p>
143
		    	</div>
144
		    	<div class="double-checks">
145
		    		<label>Max VMs per user</label>
146
		    		<div class="form-row">
147
		    			<p class="clearfix">
148
		    				<label for="vm_per_user_unlimited">Unlimited</label>
149
		    				<input type="checkbox" id="vm_per_user_unlimited" name="vm_per_user_unlimited" class="unlimited" checked="checked">
150
		    			</p>
151
		    		</div>
152
		    		<div class="form-row">
153
		    			<p class="clearfix">
154
		    				<label for="vm_per_user_limited">Limited</label>
155
		    				<input type="checkbox" id="vm_per_user_limited" name="vm_per_user_limited" class="limited">
156
		       				<input type="text" id="vm_user_limited_num"/>
157
		       				 
158
		    			</p>
159
		    		</div>
160
		    		
161
		    	</div> 
162
		    </fieldset>
163
		    <fieldset class="quota cpu" style="background:none;">
164
		    	 
165
		    	<legend>cpu</legend>
166
		    	<div class="form-row">
167
		    		<p class="clearfix">
168
		    			<label for="num_cpu">Total cpus</label>
169
		    			<input type="text" name="num_cpu">
170
		    			<span class="extra-img">&nbsp;</span>
171
		         		<span class="info"> 
172
					    	<em>more info</em>
173
					    	<span>Help Text</span>
174
				    	</span>
175
		    		</p>
176
		    	</div>
177
		    	<div class="double-checks">
178
		    		<label>Max cpus per user</label>
179
		    		<div class="form-row">
180
		    			<p class="clearfix">
181
		    				<label for="cpu_per_user_unlimited">Unlimited</label>
182
		    				<input type="checkbox" id="cpu_per_user_unlimited" name="cpu_per_user_unlimited" class="unlimited" checked="checked">
183
		    			</p>
184
		    		</div>
185
		    		<div class="form-row">
186
		    			<p class="clearfix">
187
		    				<label for="cpu_per_user_limited">Limited</label>
188
		    				<input type="checkbox" id="cpu_per_user_limited" name="cpu_per_user_limited" class="limited">
189
		       				<input type="text" id="cpu_user_limited_num"/>
190
		       				 
191
		    			</p>
192
		    		</div>
193
		    		
194
		    	</div> 
195
		    </fieldset>
196
		    <fieldset class="quota ram">
197
		    	 
198
		    	<legend>ram</legend>
199
		    	<div class="form-row">
200
		    		<p class="clearfix">
201
		    			<label for="num_ram">Total ram</label>
202
		    			<input type="text" name="num_ram">
203
		    			<span class="extra-img">&nbsp;</span>
204
		         		<span class="info"> 
205
					    	<em>more info</em>
206
					    	<span>Help Text</span>
207
				    	</span>
208
		    		</p>
209
		    	</div>
210
		    	<div class="double-checks">
211
		    		<label>Max ram per user</label>
212
		    		<div class="form-row">
213
		    			<p class="clearfix">
214
		    				<label for="ram_per_user_unlimited">Unlimited</label>
215
		    				<input type="checkbox" id="ram_per_user_unlimited" name="ram_per_user_unlimited" class="unlimited" checked="checked">
216
		    			</p>
217
		    		</div>
218
		    		<div class="form-row">
219
		    			<p class="clearfix">
220
		    				<label for="ram_per_user_limited">Limited</label>
221
		    				<input type="checkbox" id="ram_per_user_limited" name="ram_per_user_limited" class="limited">
222
		       				<input type="text" id="ram_user_limited_num"/>
223
		       				 
224
		    			</p>
225
		    		</div>
226
		    		
227
		    	</div> 
228
		    </fieldset>
229
		</div>    
230
		<div class="group storage_1">
231
			<a href="#icons" class="delete"><strong>X</strong> remove resource</a>	
232
		    <fieldset class="quota storage">
233
		    	<legend>STORAGE</legend>
234
		    	<div class="form-row">
235
		    		<p class="clearfix">
236
		    			<label for="num_storage">Total storage</label>
237
		    			<input type="text" name="num_storage">
238
		    			<span class="extra-img">&nbsp;</span>
239
		         		<span class="info"> 
240
					    	<em>more info</em>
241
					    	<span>Help Text</span>
242
				    	</span>
243
		    		</p>
244
		    	</div>
245
		    	<div class="double-checks">
246
		    		<label>Max Storage per user</label>
247
		    		<div class="form-row">
248
		    			<p class="clearfix">
249
		    				<label for="storage_per_user_unlimited">Unlimited</label>
250
		    				<input type="checkbox" id="storage_per_user_unlimited" name="storage_per_user_unlimited" class="unlimited" checked="checked">
251
		    			</p>
252
		    		</div>
253
		    		<div class="form-row">
254
		    			<p class="clearfix">
255
		    				<label for="storage_per_user_limited">Limited</label>
256
		    				<input type="checkbox" id="storage_per_user_limited" name="storage_per_user_limited" class="limited">
257
		       				<input type="text" id="storage_user_limited_num"/>
258
		       				 
259
		    			</p>
260
		    		</div>
261
		    		
262
		    	</div> 
263
		    </fieldset>
264
	    </div>
265
	</div>
165 266
    <div class="form-row submit">
166
	   <input type="submit" value="SUBMIT" class="submit altcol" autocomplete="off">
267
   		<input type="submit" value="SUBMIT" class="submit altcol" autocomplete="off">
167 268
	</div>     
168 269
</form>
169 270
	 
271
<script>
272
	
273
</script>	 
170 274
 
171 275
{% endblock %}
b/snf-astakos-app/astakos/im/templates/im/astakosuserquota_list.html
14 14
    				<h3>{{ r.description }}</h3>
15 15
    				<p>
16 16
    					{{ r.ratio|floatformat }}% Used<br>
17
    					You are using {{ r.currValue }} {{ r.unit }} out of your {{ r.maxValue }}{{ r.unit }} {{ r.plural|capfirst }} - Aouch!
17
    					You are using {{ r.currValue }} {{ r.unit }} out of your {{ r.maxValue }}{{ r.unit }} 
18
    					{% if r.maxValue == '1' %}
19
    						{{ r.name|capfirst}}
20
    					{% else %} 
21
    						{{ r.plural|capfirst }}
22
    					{% endif %}
23
    					 - Aouch!
18 24
    				</p>
19 25
    			</div>
20 26
    			<div class="bar">
b/snf-astakos-app/astakos/im/views.py
1050 1050
            'name': 'vm',
1051 1051
            'description': 'Number Of Vms',
1052 1052
            'unit':'',
1053
            'maxValue':'100',
1054
            'currValue':'50'
1053
            'maxValue':'1',
1054
            'currValue':'1'
1055 1055
            },{
1056 1056
            'name': 'ram',
1057 1057
            'description':'Total Ram Usage',
......
1113 1113
                       extra_context={'form': form, 'data':data})
1114 1114

  
1115 1115

  
1116

  
1117
def group_create_demo(request):
1118
    
1119
    resource_catalog = {
1120
        'groups': {
1121
            'compute': {
1122
                'cyclades.vm':  { 'unit': 'number' }, 
1123
                'cyclades.ram': { 'unit': 'bytes' }, 
1124
                'cyclades.cpu': { 'unit': 'number' }
1125
            },
1126
            'storage': {
1127
                'pithos.diskspace' : { 'unit': 'mebibytes' }
1128
            }
1129
        }
1130
    }
1131
    
1132
    
1133
    return render_response(
1134
        template='im/astakosgroup_form_demo.html',
1135
        context_instance=get_context(request),
1136
        resource_catalog=resource_catalog,
1137
        groups=resource_catalog['groups'] )
1138
     
1139

  
1140

  
1116 1141
def group_create_list(request):
1117 1142
    form = PickResourceForm()
1118 1143
    return render_response(
......
1181 1206
        
1182 1207
    return data
1183 1208

  
1184
def group_create_demo(request):
1185
    return render_response(
1186
        template='im/astakosgroup_form_demo.html',
1187
        context_instance=get_context(request))
1188
    
1189
    return data    
1190 1209

  
1210
     
1211
     
1191 1212
@signed_terms_required
1192 1213
@login_required
1193 1214
def timeline(request):

Also available in: Unified diff