Skip to content

Commit 1c482b5

Browse files
committed
Infrastructure UI plugin API: Add 'resource' method
Add new method 'infrastructure.resource' for retrieving resource objects from the infrastructure section. Specify the type as a string (i.e, 'pod' 'cluster' or 'host') and the entire resource object will be returned, including listView, actions, createForm, etc. Updating the data in this resource will automatically update the UI.
1 parent d53d06c commit 1c482b5

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

ui/modules/infrastructure/infrastructure.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,17 @@
4040
state: state
4141
});
4242
});
43+
},
44+
45+
resource: function(args) {
46+
var type = args.type;
47+
48+
if (type) {
49+
return cloudStack.sections.system.subsections[type];
50+
} else {
51+
return false;
52+
}
4353
}
4454
});
4555
};
46-
}(jQuery, cloudStack));
56+
}(jQuery, cloudStack));

0 commit comments

Comments
 (0)