Revision 83c5feb3

View differences:

src/sunstone/public/app/tabs/templates-tab/actions.js
21 21
    "Template.list" : _commonActions.list(),
22 22
    "Template.show" : _commonActions.show(),
23 23
    "Template.refresh" : _commonActions.refresh(),
24
    "Template.delete" : _commonActions.delete(),
24
    "Template.delete" : _commonActions.del(),
25
    "Template.chown": _commonActions.multipleAction('chown'),
26
    "Template.chgrp": _commonActions.multipleAction('chgrp'),
27
    "Template.chmod": _commonActions.singleAction('chmod'),
28
    "Template.rename": _commonActions.singleAction('rename'),
25 29
    "Template.create" : {
26 30
      type: "create",
27 31
      call: OpenNebulaTemplate.create,
......
84 88
        Notifier.onError(request, response);
85 89
      }
86 90
    },
87
    "Template.rename" : {
88
      type: "single",
89
      call: OpenNebulaTemplate.rename,
90
      callback: function(request) {
91
        Sunstone.runAction('Template.show', request.request.data[0][0]);
92
      },
93
      error: Notifier.onError,
94
      notify: true
95
    },
96 91
    "Template.instantiate" : {
97 92
      type: "multiple",
98 93
      call: OpenNebulaTemplate.instantiate,
......
138 133
      call: OpenNebulaTemplate.clone,
139 134
      error: Notifier.onError,
140 135
      notify: true
141
    },
142
    "Template.chown" : {
143
      type: "multiple",
144
      call: OpenNebulaTemplate.chown,
145
      callback:  function (req) {
146
        Sunstone.runAction("Template.show", req.request.data[0]);
147
      },
148
      elements: function() {
149
        return Sunstone.getDataTable(TAB_ID).elements();
150
      },
151
      error: Notifier.onError,
152
      notify: true
153
    },
154
    "Template.chgrp" : {
155
      type: "multiple",
156
      call: OpenNebulaTemplate.chgrp,
157
      callback:  function (req) {
158
        Sunstone.runAction("Template.show", req.request.data[0]);
159
      },
160
      elements: function() {
161
        return Sunstone.getDataTable(TAB_ID).elements();
162
      },
163
      error: Notifier.onError,
164
      notify: true
165
    },
166
    "Template.chmod" : {
167
      type: "single",
168
      call: OpenNebulaTemplate.chmod,
169
      callback:  function (req) {
170
        Sunstone.runAction("Template.show", req.request.data[0]);
171
      },
172
      elements: function() {
173
        return Sunstone.getDataTable(TAB_ID).elements();
174
      },
175
      error: Notifier.onError,
176
      notify: true
177 136
    }
178 137
  };
179 138

  

Also available in: Unified diff