Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
gregone committed Aug 5, 2021
1 parent 44e3f38 commit 2540fd9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import ApiService from 'waypoint/services/api';
import { ConfigGetRequest, Ref } from 'waypoint-pb';

export default class WorkspaceProjectsProjectSettingsConfigVariables extends Route.extend({
// anything which *must* be merged to prototype here
}) {
// normal class body definition here
interface ProjectModelParams {
project_id: string;
}
export default class WorkspaceProjectsProjectSettingsConfigVariables extends Route {
@service api!: ApiService;

async model() {
let ref = new Ref.Project();
let params = this.paramsFor('workspace.projects.project') as ProjectModelParams;
ref.setProject(params.project_id);
let req = new ConfigGetRequest();
req.setProject(ref);

let config = await this.api.client.getConfig(req, this.api.WithMeta());
return config?.toObject();
}
}
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
<h3>Config Variables</h3>
{{#if this.model.variablesList.length}}
<ul>
{{#each this.model.variablesList as |variable|}}
<li>{{variable.name}} | {{variable.pb_static}}</li>
{{/each}}
</ul>
{{/if}}

0 comments on commit 2540fd9

Please sign in to comment.