Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<body class="mat-typography">
<df-root></df-root>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
<script src="runtime.62892cf87228e373.js" type="module"></script><script src="polyfills.cb64ea9d35bc0a9e.js" type="module"></script><script src="main.566154af96e9ca13.js" type="module"></script></body>
<script src="runtime.e419eef2196e04e6.js" type="module"></script><script src="polyfills.cb64ea9d35bc0a9e.js" type="module"></script><script src="main.566154af96e9ca13.js" type="module"></script></body>
</html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@
[content]="getControl('content')"
[scmRepository]="getControl('scmRepository')"
[scmReference]="getControl('scmReference')"
[hideScmActions]="true"
[snapshotTimestamp]="scriptDetails?.lastModifiedDate"></df-script-editor>
[hideScmActions]="true"></df-script-editor>
<div class="full-width action-bar">
<button class="cancel-btn" mat-flat-button type="button" (click)="goBack()">
{{ 'cancel' | transloco }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,6 @@ <h4 class="text-center" style="color: black !important">
[scmReference]="getConfigControl('scmReference')"
[cache]="serviceData ? serviceData.name : ''"
[hideScmActions]="true"
[snapshotTimestamp]="serviceData?.lastModifiedDate"
class="full-width"></df-script-editor>
</ng-container>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export class DfScriptEditorComponent implements OnInit {
@Input() isScript: boolean;
@Input() cache: string;
@Input() hideScmActions = false;
@Input() snapshotTimestamp?: string | Date | null;
@Input() scmRepository?: FormControl;
@Input() scmReference?: FormControl;
@Input({ required: true }) type: FormControl;
Expand Down Expand Up @@ -97,6 +96,11 @@ export class DfScriptEditorComponent implements OnInit {
if (this.storageServiceId.getRawValue() || this.storagePath.getRawValue()) {
this.checked = true;
this.storagePath.addValidators([Validators.required]);
// The editor is showing the snapshot as loaded right now. The running
// script always uses whatever is currently in linked storage, so the
// banner date means "when you last pulled it" — not the service row's
// last_modified_date, which never bumps for a storage-linked script.
this.lastRefreshedAt = new Date();
}
// Track previous value so we only reset storagePath on a real user-driven
// service change, not when the parent patches the form on load/prefill.
Expand Down Expand Up @@ -214,17 +218,11 @@ export class DfScriptEditorComponent implements OnInit {
}

get showSnapshotBanner(): boolean {
return (
!!this.storageServiceId?.getRawValue() &&
(!!this.snapshotTimestamp || !!this.lastRefreshedAt)
);
return !!this.storageServiceId?.getRawValue() && !!this.lastRefreshedAt;
}

get snapshotDisplayDate(): Date | null {
if (this.lastRefreshedAt) return this.lastRefreshedAt;
if (!this.snapshotTimestamp) return null;
const d = new Date(this.snapshotTimestamp);
return isNaN(d.getTime()) ? null : d;
return this.lastRefreshedAt;
}

get snapshotLocked(): boolean {
Expand Down
Loading