-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f96503
commit 06a0d0b
Showing
3 changed files
with
97 additions
and
5 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,62 @@ | ||
<template> | ||
<div>Manage scripts</div> | ||
<RoutedTableExplorer | ||
v-if="session" | ||
<InputSelect :options="schemas"></InputSelect> | ||
<TableExplorer | ||
tableId="Templates" | ||
schemaId="_SYSTEM_" | ||
:canEdit="true" | ||
:canManage="false" | ||
> | ||
</RoutedTableExplorer> | ||
<template v-slot:rowheader="slotProps"> | ||
<TemplateEditButton :taskId="slotProps.row.id" /> | ||
</template> | ||
</TableExplorer> | ||
</template> | ||
|
||
<script> | ||
import { RoutedTableExplorer } from "molgenis-components"; | ||
import { TableExplorer, InputSelect } from "molgenis-components"; | ||
import TemplateEditButton from "./TemplateEditButton.vue"; | ||
import { request } from "graphql-request"; | ||
export default { | ||
components: { | ||
RoutedTableExplorer, | ||
TemplateEditButton, | ||
TableExplorer, | ||
InputSelect, | ||
}, | ||
props: { | ||
session: Object, | ||
}, | ||
data: function () { | ||
return { | ||
schemas: [], | ||
loading: false, | ||
graphqlError: null, | ||
}; | ||
}, | ||
created() { | ||
this.getSchemaList(); | ||
}, | ||
methods: { | ||
getSchemaList() { | ||
this.loading = true; | ||
const schemaFragment = "_schemas{id,label,description}"; | ||
const lastUpdateFragment = | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
"_lastUpdate{schemaName, tableName, stamp, userId, operation}"; | ||
request( | ||
"graphql", | ||
`{${schemaFragment} ${this.showChangeColumn ? lastUpdateFragment : ""}}` | ||
) | ||
.then((data) => { | ||
this.schemas = data._schemas; | ||
this.loading = false; | ||
}) | ||
.catch((error) => { | ||
console.error("internal server error", error); | ||
this.graphqlError = "internal server error" + error; | ||
this.loading = false; | ||
}); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
This comment has been minimized.
Sorry, something went wrong.
connoratrug
Contributor
|
||
<div> | ||
<IconAction v-if="!isModalShown" icon="search" @click="open" /> | ||
<LayoutModal v-else title="Job details" :show="isModalShown" @close="close"> | ||
<template #body> | ||
<Task v-if="taskId" :taskId="taskId" /> | ||
</template> | ||
<template #footer> | ||
<ButtonAlt @click="close">Close</ButtonAlt> | ||
</template> | ||
</LayoutModal> | ||
</div> | ||
</template> | ||
<script> | ||
import { | ||
ButtonAction, | ||
ButtonAlt, | ||
IconAction, | ||
LayoutModal, | ||
Task, | ||
} from "molgenis-components"; | ||
export default { | ||
components: { | ||
IconAction, | ||
LayoutModal, | ||
ButtonAction, | ||
ButtonAlt, | ||
Task, | ||
}, | ||
props: { | ||
taskId: { | ||
type: String, | ||
required: true, | ||
}, | ||
}, | ||
data() { | ||
return { | ||
error: null, | ||
success: null, | ||
loading: false, | ||
isModalShown: false, | ||
}; | ||
}, | ||
methods: { | ||
open() { | ||
this.isModalShown = true; | ||
}, | ||
close() { | ||
this.isModalShown = false; | ||
}, | ||
}, | ||
}; | ||
</script> |
do you need the lastUpdate here ?