Skip to content

Commit

Permalink
Update Repositories code to handle loading of Daliuge files instead o…
Browse files Browse the repository at this point in the history
…f Configs
  • Loading branch information
james-strauss-uwa committed Aug 9, 2024
1 parent 27117f6 commit 0102d9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Repositories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Repositories {
static selectFile(file : RepositoryFile) : void {
const eagle: Eagle = Eagle.getInstance();

if(file.type === Eagle.FileType.Graph || file.type === Eagle.FileType.JSON || file.type === Eagle.FileType.GraphConfig){
if(file.type === Eagle.FileType.Graph || file.type === Eagle.FileType.JSON || file.type === Eagle.FileType.Daliuge){
eagle.showEagleIsLoading()
}

Expand All @@ -50,8 +50,8 @@ export class Repositories {
case Eagle.FileType.JSON:
isModified = eagle.logicalGraph().fileInfo().modified;
break;
case Eagle.FileType.GraphConfig:
isModified = eagle.graphConfig().fileInfo().modified;
case Eagle.FileType.Daliuge:
isModified = eagle.logicalGraph().fileInfo().modified;
break;
}

Expand Down
6 changes: 4 additions & 2 deletions src/RepositoryFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export class RepositoryFile {
type : Eagle.FileType;
isFetching: ko.Observable<boolean>

static readonly DUMMY = new RepositoryFile(Repository.DUMMY, "", "");

constructor(repository : Repository, path : string, name : string){
this._id = Math.floor(Math.random() * 1000000000000);
this.repository = repository;
Expand All @@ -30,8 +32,8 @@ export class RepositoryFile {
return "palette";
case Eagle.FileType.JSON:
return "language";
case Eagle.FileType.GraphConfig:
return "construction";
case Eagle.FileType.Daliuge:
return "construction"; // TODO: better icon
default:
return this.type;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<input id="graphFileToLoad" class="fileSelector" type="file" name="file" data-bind="event: { change: loadLocalGraphFile }">
<input id="graphFileToInsert" class="fileSelector" type="file" name="file" data-bind="event: { change: insertLocalGraphFile }">
<input id="paletteFileToLoad" class="fileSelector" type="file" name="file" data-bind="event: { change: loadLocalPaletteFile }">
<input id="configFileToLoad" class="fileSelector" type="file" name="file" data-bind="event: { change: loadLocalConfigFile }">
<input id="daliugeFileToLoad" class="fileSelector" type="file" name="file" data-bind="event: { change: loadLocalDaliugeFile }">
</div>

{% include 'navbar.html' %}
Expand Down

0 comments on commit 0102d9b

Please sign in to comment.