Change model attributes to tracked
This commit is contained in:
1 parent
2bb9db6a67
commit
c2b4c0ad8b
2 files changed
+6
-4
No files matched your search
@@ -2,12 +2,13 @@ import GeneratedSessionModel from '../generated/models/session';
|
||||
import { computed } from '@ember/object';
|
||||
import { equal } from '@ember/object/computed';
|
||||
import { attr } from '@ember-data/model';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
|
||||
export default class SessionModel extends GeneratedSessionModel {
|
||||
// =attributes
|
||||
|
||||
@attr('boolean', { readOnly: true }) acknowledged;
|
||||
@attr('boolean', { readOnly: true }) started_desktop_client;
|
||||
@tracked acknowledged;
|
||||
@tracked started_desktop_client;
|
||||
@attr('string', { readOnly: true }) proxy_address;
|
||||
@attr('number', { readOnly: true }) proxy_port;
|
||||
|
||||
|
||||
@@ -111,7 +111,9 @@ export default class ScopesScopeProjectsTargetsRoute extends Route {
|
||||
|
||||
// Associate the connection details with the session
|
||||
const { session_id, address, port } = connectionDetails;
|
||||
await this.store.findRecord('session', session_id);
|
||||
const session = await this.store.findRecord('session', session_id);
|
||||
// Flag the session has been open in the desktop client
|
||||
session.started_desktop_client = true;
|
||||
|
||||
// Update the session record with proxy information from the CLI
|
||||
// This is read-only information that shouldn't dirty the session,
|
||||
@@ -124,7 +126,6 @@ export default class ScopesScopeProjectsTargetsRoute extends Route {
|
||||
id: session_id,
|
||||
type: 'session',
|
||||
attributes: {
|
||||
started_desktop_client: true,
|
||||
proxy_address: address,
|
||||
proxy_port: port
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user