MCPcopy Create free account
hub / github.com/chartbrew/chartbrew / findByProject

Method findByProject

server/controllers/ChartController.js:124–141  ·  view source on GitHub ↗
(projectId)

Source from the content-addressed store, hash-verified

122 }
123
124 findByProject(projectId) {
125 return db.Chart.findAll({
126 where: { project_id: projectId },
127 order: [["dashboardOrder", "ASC"], [db.ChartDatasetConfig, "order", "ASC"]],
128 include: [
129 { model: db.ChartDatasetConfig, include: [{ model: db.Dataset }] },
130 { model: db.Chartshare },
131 { model: db.Alert },
132 { model: db.SharePolicy, scope: { entity_type: "Chart" } },
133 ],
134 })
135 .then((charts) => {
136 return charts;
137 })
138 .catch((error) => {
139 return new Promise((resolve, reject) => reject(error));
140 });
141 }
142
143 findById(id, customQuery, options = {}) {
144 const query = {

Callers 2

ChartRoute.jsFile · 0.45
ConnectionRoute.jsFile · 0.45

Calls 1

findAllMethod · 0.45

Tested by

no test coverage detected