Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amp 2826 search #499

Merged
merged 2 commits into from
Nov 8, 2023
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
57 changes: 22 additions & 35 deletions src/components/dashboard/DashboardTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,58 +130,45 @@
</td>
<td v-if="checkAvailability('externalId')">{{ rec.externalId }}</td>
<td v-if="checkAvailability('itemName')">{{ rec.itemName }}</td>
<td v-if="checkAvailability('primaryfileName') && canAccessLink(rec, true)">
<td v-if="checkAvailability('primaryfileName')">
<a
v-if="canAccessLink(rec, true)"
@click="workflowResultService.getSymlinkContent(rec, false, parent, $event)"
target="_blank"
class="complete-output"
>{{ rec.primaryfileName }}</a
>
</td>
<td v-else-if="checkAvailability('primaryfileName')">
{{ rec.primaryfileName }}
>{{ rec.primaryfileName }}
</a>
<span v-else>{{ rec.primaryfileName }}</span>
</td>
<td v-if="checkAvailability('workflowName')">
{{ rec.workflowName }}
</td>
<td v-if="checkAvailability('workflowStep')">
{{ rec.workflowStep }}
</td>
<td
v-if="checkAvailability('outputName') &&
canAccessLink(rec, false) &&
outputReady(rec)"
>
<a
<td v-if="checkAvailability('outputName')">
<a v-if="canAccessLink(rec, false) && outputReady(rec)"
@click="workflowResultService.getSymlinkContent(rec, true, parent, $event)"
target="_blank"
class="complete-output"
>{{ rec.outputName }}</a
>
</td>
<td v-else-if="checkAvailability('outputName') && canAccessLink(rec, false)">
<a role="link" aria-disabled="true">{{ rec.outputName }}</a>
</td>
<td v-else-if="checkAvailability('outputName')">
{{ rec.outputName }}
>{{ rec.outputName }}
</a>
<a v-else-if="canAccessLink(rec, false)"
role="link" aria-disabled="true">{{ rec.outputName }}
</a>
<span v-else> {{ rec.outputName }} </span>
</td>
<td
v-if="checkAvailability('outputLabel') &&
canAccessLink(rec, false) &&
outputReady(rec)"
>
<a
@click="workflowResultService.getSymlinkContent(rec, true, parent, $event)"
<td v-if="checkAvailability('outputLabel')">
<a v-if="canAccessLink(rec, false) && outputReady(rec)"
@click="workflowResultService.getSymlinkContent(rec, true, parent, $event)"
target="_blank"
class="complete-output"
>{{ rec.outputLabel }}</a
>
</td>
<td v-else-if="checkAvailability('outputLabel') && canAccessLink(rec, false)">
<a role="link" aria-disabled="true" class="complete-output">{{ rec.outputLabel }}</a>
</td>
<td v-else-if="checkAvailability('outputLabel')">
{{ rec.outputLabel }}
>{{ rec.outputLabel }}
</a>
<a v-else-if="canAccessLink(rec, false)"
role="link" aria-disabled="true">{{ rec.outputLabel }}
</a>
<span v-else> {{ rec.outputLabel }} </span>
</td>
<td v-if="checkAvailability('groundTruth')">
{{ rec.groundTruth }}
Expand Down
8 changes: 3 additions & 5 deletions src/components/entity/EntityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,6 @@ export default {
self.showEdit = false;
}
} else if (self.baseUrl === "file") {
console.log("start loading file: showLoader = " + self.showLoader);
self.showLoader = true;
self.entity = self.selectedFile;
if (self.accessControl._primaryfile_media._read) {
Expand All @@ -1375,9 +1374,8 @@ export default {
);
self.entity["mediaInfo"] = mediaSourceType.mediaInfo;
self.entity["mediaType"] = mediaSourceType.mimeType.substring(0, 5);
console.log("mediaType = " + self.entity.mediaType);
// console.log("mediaType = " + self.entity.mediaType);
self.showLoader = false;
console.log("end loading file: showLoader = " + self.showLoader);
}
},
async getUnitCollections() {
Expand Down Expand Up @@ -1516,8 +1514,8 @@ export default {
formHTML.style.width = "100%";
}

console.log("end of mounted: mediaSource = " + self.entity.mediaSource);
console.log("end of mounted: mediaType = " + self.entity.mediaType);
// console.log("end of mounted: mediaSource = " + self.entity.mediaSource);
// console.log("end of mounted: mediaType = " + self.entity.mediaType);
},
};
</script>
Expand Down
37 changes: 6 additions & 31 deletions src/components/entity/OutputFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,53 +34,27 @@
<!-- -->
<tr v-for="output in listOfOutputList" :key="output.id">
<td>
<!-- <input type="text" :value="12/28/2021" class="form-control" disabled /> -->
<p>{{ new Date(output.dateCreated) | LOCAL_DATE_VALUE }}</p>
</td>
<td>
<!-- <input
type="text"
:value="output.submitter"
class="form-control"
disabled
/> -->
{{ output.submitter }}
</td>
<td>
<!-- <input
type="text"
:value="output.workflowName"
class="form-control"
disabled
/> -->
{{ output.workflowName }}
</td>

<td>
<!-- <input
type="text"
:value="output.workflowStep"
class="form-control"
disabled
/> -->
{{ output.workflowStep }}
</td>
<td>
<!-- <input
type="text"
:value="output.outputLink"
class="form-control"
disabled
/> -->
<a
v-if="
output.outputPath != null &&
output.status == 'COMPLETE' &&
accessControl._workflowresult_output._read
"
@click="workflowResultService.getSymlinkContent(output, true, null, $event)"
class="complete-output"
target="_blank"
v-if="
output.outputPath != null &&
output.status == 'COMPLETE' &&
accessControl._workflowresult._read
"
>
{{ output.outputName }}</a
>
Expand Down Expand Up @@ -189,6 +163,7 @@ export default {
},
mounted() {
this.getOutputFileList();
console.log("accessControl._workflowresult_output._read = " + this.accessControl._workflowresult_output._read);
},
};
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/evaluation/TestResultsVisualiz.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
@click="workflowResultService.getSymlinkContent(testResult.workflowResult, true, null, $event)"
target="_blank"
>{{
testResult.workflowResult.workflowStep
testResult.workflowResult.outputName
}}</a
>)
</h6>
Expand Down
3 changes: 1 addition & 2 deletions src/service/access-control-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ export default class AccessControlService extends BaseService {
break;
}
} else if (
action.targetType ===
env.getEnv("VUE_APP_AC_TARGETTYPE_PRIMARYFILE")
action.targetType === env.getEnv("VUE_APP_AC_TARGETTYPE_PRIMARYFILE")
) {
switch (action.actionType) {
case env.getEnv("VUE_APP_AC_ACTIONTYPE_CREATE"):
Expand Down
3 changes: 1 addition & 2 deletions src/service/account-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function sendActivateUserRequest(userToken) {
}

function login(username, password) {
console.log("login");
return baseService.post(`/account/authenticate`, { username, password })
.then(response => {
const { token, user } = response.data;
Expand All @@ -93,7 +92,7 @@ async function validate() {
console.log("IN ERROR");
return false;
});
console.log("Success: " + success);
console.log("User authenticated: " + success);
return success;
}

Expand Down
4 changes: 3 additions & 1 deletion src/service/hmgm-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ async function auth_token_required(auth_string, input_file){

async function auth_token_valid(auth_string, input_file, user_token){
if(env.getDisableAuth() == 'true'){
console.log("Authenticated disabled: " + success);
return true;
}

// TODO the following API call to check auth string might be unnecessary,
// because the backend validate auth string upon any HMGM API call;
// the purpose here might be to prevent the page from being shown beore any HMGM API call is made
Expand All @@ -43,8 +45,8 @@ async function auth_token_valid(auth_string, input_file, user_token){
console.log("Error: " + e);
return false;
});
console.log("Success: " + success);

console.log("User authenticated for HMGM editor: " + success);
return success;
}

Expand Down
Loading