Skip to content

add additional items to the pool config tab#463

Merged
ascobie merged 14 commits into
masterfrom
feature/additional-pool-config-details
Jun 19, 2017
Merged

add additional items to the pool config tab#463
ascobie merged 14 commits into
masterfrom
feature/additional-pool-config-details

Conversation

@ascobie
Copy link
Copy Markdown
Member

@ascobie ascobie commented Jun 15, 2017

Fix #462

Comment thread app/models/certificate-reference.ts Outdated
/**
* A reference to an application package to be deployed to a compute nodes
*/
export class CertificateReference {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the @model thing this will fail

public set pool(value: Pool) {
this._pool = value;
this.decorator = new PoolDecorator(this._pool);
this._refresh(this._pool);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer doing this in the ngOnChanges, it is made for that

Copy link
Copy Markdown
Member Author

@ascobie ascobie Jun 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, though they are both set on change are they not? I would have thought the pool set method would be the perfect place for it?

According to these guys, if there is only a single input property then in the property setter is probably the best place for it. With many inputs, then ngOnChanges handles all changes at once, so would be probably better.

https://stackoverflow.com/questions/40577929/angular-2-setters-vs-ngonchanges

Adding in another event handler when not really required would seem to add an extra performance hit.

Just my thoughts.

Comment thread app/models/certificate-reference.ts Outdated
@Prop() public thumbprintAlgorithm: string;
@Prop() public storeLocation: string;
@Prop() public storeName: string;
@Prop() public visibility: string[];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be ListProp here

@ListProp(String) public visibility: List<string> = List([]);

Don't forget to set the default value to be an empty list too that way we never have to check for null for list

Comment thread app/models/network-configuration.ts Outdated
@@ -0,0 +1,12 @@
import { Record } from "immutable";

const NetworkConfigurationRecord = Record({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to @model and Record

Comment thread app/models/start-task-info.ts Outdated
export class StartTaskInfo extends Record<StartTaskInfoAttributes> {
@Prop() public state: TaskState;
@Prop() public startTime?: Date;
@Prop() public endTime?: Date;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't make some attribute here optional ? only in the interface for the attributes

Comment thread app/utils/date-utils.ts Outdated
public static computeRuntime(startTime?: Date, endTime?: Date): string {
if (!startTime) {
return null;
} else {
Copy link
Copy Markdown
Member

@timotheeguerin timotheeguerin Jun 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for else here

@ascobie ascobie added this to the 0.5.0 milestone Jun 18, 2017
@ascobie ascobie merged commit 099c797 into master Jun 19, 2017
@ascobie ascobie deleted the feature/additional-pool-config-details branch June 19, 2017 02:18
@timotheeguerin timotheeguerin modified the milestone: 0.5.0 Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants