summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-13 03:13:33 +0000
committerGerrit Code Review <review@openstack.org>2018-06-13 03:13:33 +0000
commita95e7aabaa934c46ed8f503db011469f082d88af (patch)
tree5e87d21a5a0acd80ee7d0ffae5c9abc54759a0c7
parent350a40c9cc9ff5d1fd7df1d9fcf62fc7ee0dad63 (diff)
parent83777f5883377978797e9c20fe230a11fb0b4de0 (diff)
Merge "Add support for OS::Swift::Container"
-rw-r--r--.gitignore1
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/modal-template.controller.js2
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-blue.svg6
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-gray.svg6
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-green.svg6
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-red.svg6
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.html64
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.js108
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.spec.js80
-rw-r--r--heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.svg6
10 files changed, 285 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index f0a19a1..7980b2c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -105,6 +105,7 @@ ENV/
105 105
106# own settings 106# own settings
107.idea/* 107.idea/*
108.vscode/*
108 109
109# angular old versions 110# angular old versions
110*angular-1.3.7* 111*angular-1.3.7*
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/modal-template.controller.js b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/modal-template.controller.js
index 12e4a1d..5a98c3f 100644
--- a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/modal-template.controller.js
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/components/modal-template.controller.js
@@ -47,6 +47,8 @@
47 func = hotgenUtils.escape_characters; 47 func = hotgenUtils.escape_characters;
48 break; 48 break;
49 case 'metadata': 49 case 'metadata':
50 case 'X-Account-Meta':
51 case 'X-Container-Meta':
50 case 'scheduler_hints': 52 case 'scheduler_hints':
51 case 'value_specs': 53 case 'value_specs':
52 func = hotgenUtils.extract_keyvalue; 54 func = hotgenUtils.extract_keyvalue;
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-blue.svg b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-blue.svg
new file mode 100644
index 0000000..49ae4ca
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-blue.svg
@@ -0,0 +1,6 @@
1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="55" height="55" viewBox="0 0 55 55">
2 <g class="currentLayer" style=""><title>Layer 1</title>
3 <circle class="frame" r="25" style="fill:white;fill-opacity=0.0;stroke-width:3;stroke:#3f51b5" cy="27.3958540558815" cx="28.04043483734131" id="svg_2"/>
4 <path d="M31.029811177767293,27.291117481099366 q0,-0.45134685728422436 -0.32391597190292043,-0.7826310037637806 t-0.7703947439853246,-0.3290607629461346 h-4.377242863552971 q-0.444290150650626,0 -0.7703947439853246,0.3290607629461346 t-0.32391597190292043,0.7826310037637806 t0.32391597190292043,0.7826310037637806 t0.7703947439853246,0.3290607629461346 h4.377242863552971 q0.444290150650626,0 0.7703947439853246,-0.3290607629461346 t0.32391597190292043,-0.7826310037637806 zM40.87860762076148,23.95604218096963 v16.6753765006487 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-24.07483574954134 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-16.6753765006487 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h24.07483574954134 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 zM41.972918336649734,16.174199814000243 v4.446767066839653 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-26.263457181317825 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-4.446767066839653 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h26.263457181317825 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 z" id="svg_1" class="" fill="#3f51b5"/>
5 </g>
6</svg>
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-gray.svg b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-gray.svg
new file mode 100644
index 0000000..9ecf38b
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-gray.svg
@@ -0,0 +1,6 @@
1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="55" height="55" viewBox="0 0 55 55">
2 <g class="currentLayer" style=""><title>Layer 1</title>
3 <circle class="frame" r="25" style="fill:white;fill-opacity=0.0;stroke-width:3;stroke:gray" cy="27.3958540558815" cx="28.04043483734131" id="svg_2"/>
4 <path d="M31.029811177767293,27.291117481099366 q0,-0.45134685728422436 -0.32391597190292043,-0.7826310037637806 t-0.7703947439853246,-0.3290607629461346 h-4.377242863552971 q-0.444290150650626,0 -0.7703947439853246,0.3290607629461346 t-0.32391597190292043,0.7826310037637806 t0.32391597190292043,0.7826310037637806 t0.7703947439853246,0.3290607629461346 h4.377242863552971 q0.444290150650626,0 0.7703947439853246,-0.3290607629461346 t0.32391597190292043,-0.7826310037637806 zM40.87860762076148,23.95604218096963 v16.6753765006487 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-24.07483574954134 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-16.6753765006487 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h24.07483574954134 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 zM41.972918336649734,16.174199814000243 v4.446767066839653 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-26.263457181317825 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-4.446767066839653 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h26.263457181317825 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 z" id="svg_1" class="" fill="gray"/>
5 </g>
6</svg>
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-green.svg b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-green.svg
new file mode 100644
index 0000000..a0a3b30
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-green.svg
@@ -0,0 +1,6 @@
1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="55" height="55" viewBox="0 0 55 55">
2 <g class="currentLayer" style=""><title>Layer 1</title>
3 <circle class="frame" r="25" style="fill:white;fill-opacity=0.0;stroke-width:3;stroke:green" cy="27.3958540558815" cx="28.04043483734131" id="svg_2"/>
4 <path d="M31.029811177767293,27.291117481099366 q0,-0.45134685728422436 -0.32391597190292043,-0.7826310037637806 t-0.7703947439853246,-0.3290607629461346 h-4.377242863552971 q-0.444290150650626,0 -0.7703947439853246,0.3290607629461346 t-0.32391597190292043,0.7826310037637806 t0.32391597190292043,0.7826310037637806 t0.7703947439853246,0.3290607629461346 h4.377242863552971 q0.444290150650626,0 0.7703947439853246,-0.3290607629461346 t0.32391597190292043,-0.7826310037637806 zM40.87860762076148,23.95604218096963 v16.6753765006487 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-24.07483574954134 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-16.6753765006487 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h24.07483574954134 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 zM41.972918336649734,16.174199814000243 v4.446767066839653 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-26.263457181317825 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-4.446767066839653 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h26.263457181317825 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 z" id="svg_1" class="" fill="green"/>
5 </g>
6</svg>
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-red.svg b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-red.svg
new file mode 100644
index 0000000..bd8ff0a
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container-red.svg
@@ -0,0 +1,6 @@
1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="55" height="55" viewBox="0 0 55 55">
2 <g class="currentLayer" style=""><title>Layer 1</title>
3 <circle class="frame" r="25" style="fill:white;fill-opacity=0.0;stroke-width:3;stroke:#C82128" cy="27.3958540558815" cx="28.04043483734131" id="svg_2"/>
4 <path d="M31.029811177767293,27.291117481099366 q0,-0.45134685728422436 -0.32391597190292043,-0.7826310037637806 t-0.7703947439853246,-0.3290607629461346 h-4.377242863552971 q-0.444290150650626,0 -0.7703947439853246,0.3290607629461346 t-0.32391597190292043,0.7826310037637806 t0.32391597190292043,0.7826310037637806 t0.7703947439853246,0.3290607629461346 h4.377242863552971 q0.444290150650626,0 0.7703947439853246,-0.3290607629461346 t0.32391597190292043,-0.7826310037637806 zM40.87860762076148,23.95604218096963 v16.6753765006487 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-24.07483574954134 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-16.6753765006487 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h24.07483574954134 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 zM41.972918336649734,16.174199814000243 v4.446767066839653 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-26.263457181317825 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-4.446767066839653 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h26.263457181317825 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 z" id="svg_1" class="" fill="#C82128"/>
5 </g>
6</svg>
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.html b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.html
new file mode 100644
index 0000000..022c897
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.html
@@ -0,0 +1,64 @@
1<md-tabs md-dynamic-height md-stretch-tabs="always" md-border-bottom>
2 <md-tab label="Properties" >
3 <md-content layout-padding>
4
5 <md-input-container class="md-block" flex-gt-xs>
6 <label>Name</label>
7 <input ng-model="$ctrl.container.name" name="name" type="text" ng-pattern="validate_name" md-maxlength="255">
8 <div ng-messages="$ctrl.formReference.name.$error" role="alert" multiple>
9 <div ng-message="pattern" class="my-message">That doesn't look like a valid container name.</div>
10 <div ng-message="md-maxlength" class="my-message">Your container name is too long.</div>
11 </div>
12 </md-input-container>
13
14 <md-input-container class="md-block" flex-gt-xs>
15 <label>X-Container-Read</label>
16 <input ng-model="$ctrl.container['X-Container-Read']" name="X-Container-Read" type="text" md-maxlength="255">
17 </md-input-container>
18
19 <md-input-container class="md-block" flex-gt-xs>
20 <label>X-Container-Write</label>
21 <input ng-model="$ctrl.container['X-Container-Write']" name="X-Container-Write" type="text" md-maxlength="255">
22 </md-input-container>
23
24 <label>Container Metadata</label>
25 <md-button ng-click="$ctrl.add_x_container_meta()" aria-label="Add" class="md-icon-button"><i class="fa fa-fw fa-plus"></i></md-button>
26 <div ng-repeat="record in $ctrl.container['X-Container-Meta']" ng-class-odd="'odd'" ng-class-even="'even'">
27 <div layout-gt-xs="row" >
28 <md-input-container class="md-block" flex-gt-xs>
29 <label>Key</label>
30 <input ng-model="record.key" type="text">
31 </md-input-container>
32 <md-input-container class="md-block" flex-gt-xs>
33 <label>Value</label>
34 <input ng-model="record.value" type="text">
35 </md-input-container>
36 <md-button ng-click="$ctrl.delete_x_container_meta($index)" aria-label="Delete" class="md-icon-button"><i class="fa fa-fw fa-times"></i></md-button>
37 </div>
38 </div>
39
40 <label>Account Metadata</label>
41 <md-button ng-click="$ctrl.add_x_account_meta()" aria-label="Add" class="md-icon-button"><i class="fa fa-fw fa-plus"></i></md-button>
42 <div ng-repeat="record in $ctrl.container['X-Account-Meta']" ng-class-odd="'odd'" ng-class-even="'even'">
43 <div layout-gt-xs="row" >
44 <md-input-container class="md-block" flex-gt-xs>
45 <label>Key</label>
46 <input ng-model="record.key" type="text">
47 </md-input-container>
48 <md-input-container class="md-block" flex-gt-xs>
49 <label>Value</label>
50 <input ng-model="record.value" type="text">
51 </md-input-container>
52 <md-button ng-click="$ctrl.delete_x_account_meta($index)" aria-label="Delete" class="md-icon-button"><i class="fa fa-fw fa-times"></i></md-button>
53 </div>
54 </div>
55
56 <md-input-container class="md-block" flex-gt-xs>
57 <md-checkbox ng-model="$ctrl.container['PurgeOnDelete']" aria-label="purge_on_delete">
58 Purge on Delete
59 </md-checkbox>
60 </md-input-container>
61
62 </md-content>
63 </md-tab>
64</md-tabs>
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.js b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.js
new file mode 100644
index 0000000..8ec1401
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.js
@@ -0,0 +1,108 @@
1(function() {
2 'use strict';
3 var c_meta_key = "X-Container-Meta",
4 a_meta_key = "X-Account-Meta",
5 c_read_key = "X-Container-Read",
6 c_write_key = "X-Container-Write",
7 purge_key = "PurgeOnDelete";
8
9 /**
10 * OS::Swift::Container
11 */
12 angular.module('horizon.dashboard.project.heat_dashboard.template_generator')
13 .value('osSwiftContainerSettings',
14 {
15 resource_key: "OS__Swift__Container",
16 admin: false,
17 icon: {
18 class: 'fa-archive ',
19 name: 'OS::Swift::Container',
20 code: '\uf0a0',
21 color: '#0bb238'
22 },
23 label: 'name',
24 modal_component: '<os-swift-container container="resource" form-reference="resourceForm"></os-swift-container>',
25 edge_settings: null,
26 necessary_properties: {
27 name: null
28 }
29 }
30 )
31
32 // Register the resource to globals
33 angular.module('horizon.dashboard.project.heat_dashboard.template_generator')
34 .run(['osSwiftContainerSettings','hotgenGlobals', function(osSwiftContainerSettings, hotgenGlobals){
35 hotgenGlobals.update_resource_icons(
36 osSwiftContainerSettings.resource_key ,
37 osSwiftContainerSettings.icon);
38
39 hotgenGlobals.update_resource_components(
40 osSwiftContainerSettings.resource_key,
41 osSwiftContainerSettings.modal_component);
42
43 hotgenGlobals.update_node_labels(
44 osSwiftContainerSettings.resource_key,
45 osSwiftContainerSettings.label);
46 }]);
47
48 // Define <os-swift-container> controller
49 function osSwiftContainerController($scope, hotgenGlobals, hotgenNotify, validationRules) {
50 this.$onInit = function(){
51 // Initialize X-Container-Meta
52 if (typeof this.container[c_meta_key] === 'undefined'){
53 this.container[c_meta_key] = [{}];
54 }
55 // Initialize X-Account-Meta
56 if (typeof this.container[a_meta_key] === 'undefined'){
57 this.container[a_meta_key] = [{}];
58 }
59 // Intialize Purge On Delete
60 if (typeof this.container[purge_key] === 'undefined'){
61 this.container[purge_key] = false;
62 }
63 };
64
65 $scope.options = hotgenGlobals.get_resource_options();
66 $scope.show_more = false;
67 $scope.validate_name = validationRules['name'];
68
69 // Container Metadata manipulation functions
70 this.add_x_container_meta = function(){
71 this.container[c_meta_key].push({})
72 }
73 this.delete_x_container_meta = function(index){
74 this.container[c_meta_key].splice(index, 1)
75 }
76
77 // Account Metadata manipulation functions
78 this.add_x_account_meta = function(){
79 this.container[a_meta_key].push({})
80 }
81 this.delete_x_account_meta = function(index){
82 this.container[a_meta_key].splice(index, 1)
83 }
84 }
85
86 function osSwiftContainerPath (basePath){
87 return basePath + 'js/resources/os__swift__container/os__swift__container.html';
88 }
89
90 osSwiftContainerController.$inject = [
91 '$scope',
92 'hotgenGlobals',
93 'hotgenNotify',
94 'horizon.dashboard.project.heat_dashboard.template_generator.validationRules',
95 ];
96
97 osSwiftContainerPath.$inject = ['horizon.dashboard.project.heat_dashboard.template_generator.basePath'];
98
99 angular.module('horizon.dashboard.project.heat_dashboard.template_generator')
100 .component('osSwiftContainer', {
101 templateUrl: osSwiftContainerPath,
102 controller: osSwiftContainerController,
103 bindings: {
104 'container': '=',
105 'formReference': '<',
106 }
107 });
108})();
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.spec.js b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.spec.js
new file mode 100644
index 0000000..040a095
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.spec.js
@@ -0,0 +1,80 @@
1(function() {
2 'use strict';
3
4 describe('component os-swift-container', function(){
5
6 beforeEach(module('horizon.dashboard.project.heat_dashboard.template_generator'));
7
8 beforeEach(module('appTemplates'));
9
10 var $scope, $isolateScope, $compile;
11 var element;
12
13 beforeEach(inject(function($injector) {
14 $scope = $injector.get('$rootScope').$new();
15 $compile = $injector.get('$compile');
16
17 $scope.resource = {};
18 $scope.resourceForm = {};
19
20 // element will enable you to test your directive's element on the DOM
21 element = $compile(angular.element('<os-swift-container container="resource"'+
22 ' form-reference="resourceForm"></os-swift-container>'))($scope);
23
24 // Digest needs to be called to set any values on the directive's scope
25 $scope.$digest();
26
27 $isolateScope = element.isolateScope();
28 }));
29
30 it('find tab title Properties', function() {
31 expect(element.find('span').html()).toContain("Properties");
32 });
33
34 it('find tab title with resource set', function() {
35 $scope.resource = {metadata: [], scheduler_hints:[]};
36
37 // element will enable you to test your directive's element on the DOM
38 element = $compile(angular.element('<os-swift-container container="resource"'+
39 ' form-reference="resourceForm"></os-swift-container>'))($scope);
40
41 // Digest needs to be called to set any values on the directive's scope
42 $scope.$digest();
43
44 $isolateScope = element.isolateScope();
45
46 expect(element.find('span').html()).toContain("Properties");
47 });
48
49 // X-Container-Meta
50 it('x-container-meta should be successfully added', function() {
51 var $ctrl = element.isolateScope().$ctrl;
52 $ctrl.add_x_container_meta();
53
54 expect($scope.resource['X-Container-Meta'].length).toEqual(2);
55 });
56
57 it('x-container-meta should be successfully deleted', function() {
58 var $ctrl = element.isolateScope().$ctrl;
59 $ctrl.delete_x_container_meta();
60
61 expect($scope.resource['X-Container-Meta'].length).toEqual(0);
62 });
63
64 // X-Account-Meta
65 it('x-account-meta should be successfully added', function() {
66 var $ctrl = element.isolateScope().$ctrl;
67 $ctrl.add_x_account_meta();
68
69 expect($scope.resource['X-Account-Meta'].length).toEqual(2);
70 });
71
72 it('x-account-meta should be successfully deleted', function() {
73 var $ctrl = element.isolateScope().$ctrl;
74 $ctrl.delete_x_account_meta();
75
76 expect($scope.resource['X-Account-Meta'].length).toEqual(0);
77 });
78
79 });
80})();
diff --git a/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.svg b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.svg
new file mode 100644
index 0000000..395f7f2
--- /dev/null
+++ b/heat_dashboard/static/dashboard/project/heat_dashboard/template_generator/js/resources/os__swift__container/os__swift__container.svg
@@ -0,0 +1,6 @@
1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="55" height="55" viewBox="0 0 55 55">
2 <g class="currentLayer" style=""><title>Layer 1</title>
3 <circle class="frame" r="25" style="fill:white;fill-opacity=0.0;stroke-width:3;stroke:black" cy="27.3958540558815" cx="28.04043483734131" id="svg_2"/>
4 <path d="M31.029811177767293,27.291117481099366 q0,-0.45134685728422436 -0.32391597190292043,-0.7826310037637806 t-0.7703947439853246,-0.3290607629461346 h-4.377242863552971 q-0.444290150650626,0 -0.7703947439853246,0.3290607629461346 t-0.32391597190292043,0.7826310037637806 t0.32391597190292043,0.7826310037637806 t0.7703947439853246,0.3290607629461346 h4.377242863552971 q0.444290150650626,0 0.7703947439853246,-0.3290607629461346 t0.32391597190292043,-0.7826310037637806 zM40.87860762076148,23.95604218096963 v16.6753765006487 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-24.07483574954134 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-16.6753765006487 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h24.07483574954134 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 zM41.972918336649734,16.174199814000243 v4.446767066839653 q0,0.45134685728422436 -0.32391597190292043,0.7826310037637806 t-0.7703947439853246,0.3290607629461346 h-26.263457181317825 q-0.444290150650626,0 -0.7703947439853246,-0.3290607629461346 t-0.32391597190292043,-0.7826310037637806 v-4.446767066839653 q0,-0.45134685728422436 0.32391597190292043,-0.7826310037637806 t0.7703947439853246,-0.3290607629461346 h26.263457181317825 q0.444290150650626,0 0.7703947439853246,0.3290607629461346 t0.32391597190292043,0.7826310037637806 z" id="svg_1" class="" fill="black"/>
5 </g>
6</svg>