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

New platform version #42

Merged
merged 1,090 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
1090 commits
Select commit Hold shift + click to select a range
3705870
Update `Docs` and `About` views
dabico Apr 26, 2024
78b59a4
Adding link to `docs` page in `SmartNavbar`
dabico Apr 26, 2024
09e1816
Remove page `h1` from `Dashboard` and `Stats`
dabico Apr 26, 2024
d1d3a51
Remove unused class styling
dabico Apr 26, 2024
ccd84b2
Move config table styling
dabico Apr 26, 2024
029c8e4
Formatting
dabico Apr 26, 2024
5113d6e
Remove the typography SASS file
dabico Apr 26, 2024
cb9e70f
Remove default background color for `SmartNavbar`
dabico Apr 27, 2024
ad151d4
Spacing
dabico Apr 27, 2024
536a3b6
Change background color of header and footer to something lighter
dabico Apr 27, 2024
6d00d7d
Removed unused redirect function from `routerMixin`
dabico Apr 27, 2024
6270992
Fix typo
dabico Apr 27, 2024
d879409
Create separate file for custom validators
dabico Apr 27, 2024
d05087e
Remove `TextInputForm` and update views that used it
dabico Apr 27, 2024
6ea9d31
Improve the confirmation modal SASS to extend less
dabico Apr 27, 2024
ee2132d
Add missing newlines at the end of files
dabico Apr 27, 2024
b146de7
Some indentation fixes, courtesy of Prettier
dabico Apr 27, 2024
a7e497b
Fix link construction bug in `HateoasConfig`
dabico Apr 27, 2024
c7c45c6
Add additional Jakarta validation annotations to repository parameters
dabico Apr 27, 2024
d62bc12
Fix: wrong service being called when verifying password change tokens
dabico Apr 27, 2024
b4df43c
Begin separating SASS for `/` into its own scoped file
dabico Apr 28, 2024
de49847
Scope styling of `Logo` component
dabico Apr 28, 2024
890bea8
Scope and improve styling of `BackToTop` component
dabico Apr 28, 2024
dd05491
Scope and improve styling of `ContentArea` component
dabico Apr 28, 2024
7e82ab5
Add router guard for admin checks
dabico Apr 28, 2024
3061914
Move content area with server controls from `/dashboard` to `/admin`
dabico Apr 28, 2024
6707cb9
Scope and improve styling of `ConfigTable` component
dabico Apr 28, 2024
f915f73
Remove all margins from `ContentArea`
dabico Apr 28, 2024
d419523
Tweak config table min and max allowed width
dabico Apr 28, 2024
26b884e
Move server config table from `/dashboard` to `/admin`
dabico Apr 28, 2024
bf6caff
Add a logfile download button to the `/admin` page
dabico Apr 28, 2024
1f70335
Add padding to the `router-view` class
dabico Apr 28, 2024
db75261
Improve styling of the `BarChart` component
dabico Apr 28, 2024
e5751f1
Use `chroma` to generate the color palette for the charts
dabico Apr 28, 2024
3e52b95
Remove `Monitor` component from use
dabico Apr 28, 2024
b0a5b35
Disable server controls during restart
dabico Apr 28, 2024
490db6d
Install `npm-run-all` dependency
dabico Apr 28, 2024
b7a0a24
Address SASS deprecation warnings
dabico Apr 28, 2024
5ed9d60
Add `eslint-plugin-prettier` to dev dependencies
dabico Apr 28, 2024
0bbd106
Add run configuration for formatting
dabico Apr 28, 2024
b106d06
Configure Vue to lint files on save
dabico Apr 28, 2024
32b3139
Update props for `SmartNavbar`
dabico Apr 28, 2024
7ab50b0
Reduce padding on functional views
dabico Apr 28, 2024
e2505ce
Allow custom width and height for `identicons`
dabico Apr 29, 2024
9d36303
Scope and improve styling of `DetailsModal` component
dabico Apr 29, 2024
071db84
Fix `BackToTop` component naming
dabico Apr 29, 2024
8ffa05e
Remove unused `Masking` component
dabico Apr 29, 2024
2122e4d
Make styling for forms global
dabico Apr 29, 2024
6b72b6f
Improve homepage styling
dabico Apr 29, 2024
a01600d
Rename `DocsView` to `DocumentationView`
dabico Apr 29, 2024
963304c
Isolate styling for text-only pages into their own scoped files
dabico Apr 29, 2024
e7022bc
Update paragraph text in `/about` page
dabico Apr 29, 2024
f93913b
Rename `StatsView` to `StatisticsView`
dabico Apr 29, 2024
4860bbc
Add default slot to `BarChart` for displaying errors
dabico Apr 29, 2024
4985184
Improve and scope styling for all charts
dabico Apr 29, 2024
d890656
Explicit error handling for `ConstraintViolationException` of `javax`
dabico Apr 30, 2024
029e85b
Improve identicon generation by using MD5
dabico Apr 30, 2024
dc8d972
Create `btn-accent` SASS mixin
dabico Apr 30, 2024
e3f15c6
Toasts should not be rounded
dabico Apr 30, 2024
47f7515
Add `PUT` mapping for updating the `uid` of a user
dabico Apr 30, 2024
ac61326
Add `PUT` mapping for updating the `organisation` of a user
dabico Apr 30, 2024
efb7ff4
Add `PUT` mapping for updating the `email` of a user
dabico Apr 30, 2024
0375543
Add additional border classes for breakpoint-specific styling
dabico Apr 30, 2024
ce02daf
Add custom Vuelidate validator for the `uid`
dabico Apr 30, 2024
dbf41ee
Add a `delete` method to the `UserService`
dabico May 1, 2024
8bc1182
Add a `delete` method to the `TokenService`
dabico May 1, 2024
ee3cfcc
Revert "Fix link construction bug in `HateoasConfig`"
dabico May 1, 2024
8338ac5
Compile all the email templates manually
dabico May 1, 2024
093273a
Fix: commited the wrong code for the verification email template
dabico May 1, 2024
cedfb02
Fix: table font issues in task notification email
dabico May 1, 2024
544ebe8
Simplify `LogInView`
dabico May 1, 2024
20862a3
Reduce code and improve styling of `RegisterView`
dabico May 1, 2024
68302c0
Reduce code and improve styling of `ResetPasswrodView`
dabico May 1, 2024
4307131
Add `CODEOWNERS`
dabico May 2, 2024
b851724
Lower opacity for disabled form control elements
dabico May 13, 2024
31cac7c
Scrub all mention of the old codename from the platform website
dabico May 13, 2024
bec65f0
Correct visual bug with the form pages
dabico May 13, 2024
0974dfb
Improve and scope CSS of `ClearableInput` component
dabico May 14, 2024
374add6
Improve `ConfigTable` controls styling
dabico May 14, 2024
b099b6a
Add a `Profile` section to the website
dabico May 14, 2024
e0d032f
Fix Prettier issue
dabico May 14, 2024
bd72c4d
Improve functionality and styling of `TextCarousel` component
dabico May 14, 2024
17f0279
Formatting, just ignore this
dabico May 14, 2024
38abd96
Update scrollbar CSS
dabico May 14, 2024
3476320
Update input override CSS
dabico May 14, 2024
323a901
Update the custom checkbox CSS
dabico May 14, 2024
ff0f2a2
Remove an unneeded `@extend`
dabico May 15, 2024
4309479
Improve form input validation CSS
dabico May 15, 2024
8385b26
Change background color when focusing form elements
dabico May 15, 2024
c988435
Greatly simplified styling of the `Counter` component
dabico May 15, 2024
68f89d8
Rename `z-index` class to `z` to match Bootstrap 5
dabico May 15, 2024
160c3d5
Address deprecation warning
dabico May 16, 2024
9b1ca5d
Improve dropdown item override CSS
dabico May 16, 2024
7dadf0f
Scope and improve styling of `DropdownSelect`
dabico May 16, 2024
731ae1a
Update default progress bar styling
dabico May 16, 2024
17e9a39
Make box shadow of the pagination links consistent with other elements
dabico May 16, 2024
23898a6
Add a color transition mixin
dabico May 16, 2024
0925511
Simplify `DialogModal` styling and structure
dabico May 16, 2024
c64038c
Improve `DashboardView` styling for the table filters
dabico May 16, 2024
4b90d77
Remove `title` prop from `PaginatedTable`
dabico May 16, 2024
d2ece7a
Introduce a mixin for box shadows
dabico May 16, 2024
69f95e9
Rename and expand mixin
dabico May 16, 2024
e4e6d3e
Improve `PaginatedTable` styling by scoping `Pagination` component CSS
dabico May 17, 2024
9e5f9d7
Move platform users table into the `AdminView`
dabico May 17, 2024
759e005
Improve `PaginatedTable` styling
dabico May 17, 2024
33bec24
Add special classes for `gap` and `grid` from Bootstrap 5
dabico May 17, 2024
06291f2
Replace margins with gaps where appropriate
dabico May 17, 2024
fe090b7
Remove leftover class
dabico May 18, 2024
cd25d4b
Simplify and improve `ConfigTable` styling
dabico May 18, 2024
2a620bd
Remove redundant file extension from `import` statement
dabico May 18, 2024
4307a51
Remove unused `TagSelect` component
dabico May 18, 2024
0fbec5d
Remove usages of `btn-secondary-border-2` from `/dashboard` and `/admin`
dabico May 18, 2024
4d4bad4
Complete overhaul of `CodeTaskView`
dabico May 18, 2024
f794474
Update CSS for chart components
dabico May 18, 2024
46c3c14
Remove unused `Range` component
dabico May 18, 2024
c1e066d
Move `confirm-modal` styling from `component` into `override`
dabico May 18, 2024
ae18d6c
Rewrite router `scrollBehavior`
dabico May 18, 2024
ef12897
Fix small documentation linkage problem
dabico May 18, 2024
c09b883
Remove unused `Break` component
dabico May 18, 2024
ac07fc4
Remove unused logo PNG
dabico May 18, 2024
b571466
`DownloadView` is no longer just a `DialogPage`
dabico May 18, 2024
9531d02
`NotFoundView` is no longer just a `DialogPage`, and is now `functional`
dabico May 18, 2024
3562b0c
Add more spacing to the `AdminView` between page sections
dabico May 18, 2024
f0f265c
Task UUID is always styled in monospace
dabico May 18, 2024
8963d1a
Do not use `v-html` where not needed
dabico May 18, 2024
37f5881
Use scoped styling for `TextCarousel`
dabico May 19, 2024
2d53584
Introduce custom component `TextCarouselSlide`
dabico May 19, 2024
cdd48ce
Globalize `canvas` styling
dabico May 19, 2024
3cb5fcf
`BarChart` titles should always be black
dabico May 19, 2024
da758db
Rewrite `TextCarouselSlide` as a functional component
dabico May 19, 2024
d94fcdb
Add specialized `FormSubmit` functional component
dabico May 19, 2024
dd90836
Integrate new component into all forms
dabico May 19, 2024
38d8a95
Minor CSS cleanup for `BackToTop`
dabico May 19, 2024
705f723
Minor CSS cleanup for `Logo`
dabico May 19, 2024
ffea15f
Minor CSS cleanup for `ContentArea`
dabico May 19, 2024
e5af453
Minor CSS cleanup for table components
dabico May 19, 2024
62ed8f0
Promote certain table CSS to the global scope
dabico May 19, 2024
c7d51ae
Override default link styling
dabico May 19, 2024
f42e8a0
Use appropriate Bootstrap variable for color transitions
dabico May 19, 2024
bd98154
Introduce custom transition values for the table rows
dabico May 19, 2024
6bb4529
Further simplify table CSS
dabico May 19, 2024
061d7d0
Replace box shadow mixin with overridden Bootstrap variable
dabico May 19, 2024
3d36e4d
Clean up fonts
dabico May 19, 2024
f18ec67
Disable default margins on horizontal rules
dabico May 19, 2024
7b3da91
Disable border radius for `Toast` elements
dabico May 19, 2024
d832131
Override default variables for tooltips
dabico May 19, 2024
2f5cf1e
Fix minor styling inconsistency with the GitHub link
dabico May 19, 2024
8221714
Use breakpoint rendering instead of CSS classes
dabico May 19, 2024
1ce8252
Simplify SVG mixins
dabico May 19, 2024
3546cf5
Add a `disabled-opacity` variable
dabico May 19, 2024
3415ebb
Allow individual token verification procedures to be overridden
dabico May 19, 2024
72cf291
Complete rewrite of `VerifyView`
dabico May 19, 2024
614eb38
Remove the obsolete `DialogPage` component
dabico May 19, 2024
595ecbf
Remove obsolete mixins
dabico May 19, 2024
1b53d75
Remove obsolete variables
dabico May 19, 2024
39df91b
Move all SVG stuff into the `mixins`
dabico May 19, 2024
ecb0ce9
Extract variables into their own file
dabico May 19, 2024
88e1f68
Remove unused CSS
dabico May 19, 2024
4d2154a
Remove unused CSS
dabico May 19, 2024
389cd11
Use newly introduced opacity variable where appropriate
dabico May 19, 2024
6bd7a4f
Merge transition SASS files
dabico May 19, 2024
a6657d8
Remove unused CSS classes
dabico May 19, 2024
6832361
Correct input size in `ConfigTable`
dabico May 19, 2024
e90170d
Isolate table CSS to not conflict with other tables on the site
dabico May 19, 2024
8a41682
Simplify styling for input groups in filters of dashboard and admin view
dabico May 19, 2024
cccb5ce
Minor simplification of `FormSubmit`
dabico May 19, 2024
0b638e1
Simplify `DialogModal` rendering
dabico May 19, 2024
b9e5a10
Simplify structure and styling of admin panel controls area
dabico May 19, 2024
ce438b2
Remove mention of DL4SE from admin panel
dabico May 19, 2024
f10b965
Change webpage title
dabico May 19, 2024
03c7093
Update index.html
dabico May 19, 2024
6294cac
Update .prettierignore
dabico May 19, 2024
29ea534
`DialogModal` components now only scrollable if explicitly enabled
dabico May 19, 2024
8c78daa
Add `disabled` prop to `Counter`
dabico May 20, 2024
9fceab1
`required` prop of `Counter` defaults to `false`
dabico May 20, 2024
18b758a
Update `form` and `input` CSS
dabico May 20, 2024
ffdc45f
`Task` endpoint can now also be filtered by `Status`
dabico May 20, 2024
c3891ee
Allow `null` / `undefined` values in `DropdownSelect`
dabico May 20, 2024
02a8b6e
Replace `header` prop with `slot` in `DropdownSelect`
dabico May 20, 2024
7bda412
Rename certain stylesheets
dabico May 20, 2024
71a7c8e
Add custom `cursor` classes
dabico May 20, 2024
7026f71
Add a `Task` filter for `Status` on the front-end
dabico May 20, 2024
d17d52b
Simplify validation CSS
dabico May 20, 2024
907f262
Correct `input` color in `ConfigTable`
dabico May 20, 2024
8351143
Add CSS utilities for opacity from Bootstrap 5
dabico May 20, 2024
6da5435
Add CSS utilities for text decoration from Bootstrap 5
dabico May 21, 2024
8badd19
Add CSS utilities for text color from GHS
dabico May 21, 2024
646f5f4
Add highly customizable Bootstrap-themed autocomplete component
dabico May 21, 2024
d169134
Fix two-way binding for `FormAutoComplete`
dabico May 22, 2024
dc05947
Integrate autocomplete into `/profile` and `/register`
dabico May 22, 2024
41812ad
Display username requirements as invalid feedback
dabico May 22, 2024
c92f23b
More reliably scope tab settings in `/profile`
dabico May 22, 2024
b337b2c
Add button for randomizing username based on email
dabico May 22, 2024
aa79263
Update override css for `.b-skeleton-text`
dabico May 22, 2024
72329bc
Update override css for the BootStrap `navbar`
dabico May 22, 2024
4071072
Add missing `!important`
dabico May 22, 2024
5b4b59e
Use docker-style generation for random usernames
dabico May 22, 2024
4c78700
Reduce column gap
dabico May 22, 2024
901e8b2
Remove Vuelidate dependency within `DropdownSelect` component
dabico May 22, 2024
a35d810
Remove Vuelidate dependency within `Counter` component
dabico May 23, 2024
2a51ed1
Changing granularity will reset granularity-specific filters
dabico May 23, 2024
9b0bd5f
Change disabled user icon appearance
dabico May 23, 2024
1522e0d
Improve `DetailsModal` styling
dabico May 24, 2024
a915fc0
Remove redundant CSS
dabico May 24, 2024
7fb1109
Set default heights for all inputs
dabico May 24, 2024
d293e39
Improve styling of `/profile` view
dabico May 24, 2024
792a008
Update default styling of progress bars
dabico May 24, 2024
e649d39
Split all variables into sections that match those in Bootstrap
dabico May 24, 2024
a33ef14
Simplify form validation CSS by extracting settings to variables
dabico May 24, 2024
34b07d3
Change default radio input styling to a square variant
dabico May 24, 2024
08015af
Globally disable border radius for all form inputs
dabico May 24, 2024
cdb14da
Remove redundant styling on some inputs
dabico May 24, 2024
b7ee3e8
Fix incorrect prop usage in `ClearableInput`
dabico May 24, 2024
5732ced
Update `ClearableInput` props
dabico May 24, 2024
42d3a4a
Update `DropdownSelect` props
dabico May 24, 2024
0c715bf
Whitespace formatting leftovers
dabico Jun 2, 2024
3d0b8fe
Add utility classes for aspect ratios from Bootstrap 5
dabico Jun 2, 2024
dd259bf
Use new utility in `PaginatedTable`
dabico Jun 2, 2024
373d917
Complete removal of `ConfigTable` component
dabico Jun 2, 2024
10c24fd
Move `toTitle` function into the `formatterMixin`
dabico Jun 2, 2024
1ff7007
Upgrade `guava` minor version
dabico Jun 3, 2024
7353f35
Upgrade `google-http-client` patch version
dabico Jun 3, 2024
c883c7a
Upgrade `jackson` patch version
dabico Jun 3, 2024
96a7f0d
Upgrade `maven-install-plugin` patch version
dabico Jun 3, 2024
28cb375
Upgrade `maven-jar-plugin` minor version
dabico Jun 3, 2024
dd14e31
Upgrade `maven-shade-plugin` minor version
dabico Jun 3, 2024
63d722b
Upgrade `maven-surefire-plugin` minor version
dabico Jun 3, 2024
35a3fab
Upgrade `maven-compiler-plugin` minor version
dabico Jun 3, 2024
8938cca
Upgrade `maven-clean-plugin` patch version
dabico Jun 3, 2024
c87c959
Split additional data index definitions into their own migration
dabico Jun 3, 2024
b6168f6
Upgrade `maven` image patch version when building back-end services
dabico Jun 3, 2024
43fa001
Upgrade JRE image patch version when running back-end services
dabico Jun 3, 2024
d66ead7
Remove all mentions of unused PKCS12 keystore
dabico Jun 3, 2024
ba36bc8
Separate `user` from `task` definition
dabico Jun 6, 2024
0806b60
Uniform changelog script formatting
dabico Jun 6, 2024
4957ee0
Migrate `Task` schema
dabico Jun 7, 2024
32d0ddb
Migrate materialized views
dabico Jun 7, 2024
25221c3
Lower crawler run delay from 6 hours to 1 hour
dabico Jun 7, 2024
3177a3e
Remove KEYSTORE_PASS env var from compose config
dabico Jun 7, 2024
e20a945
Update custom docker image names
dabico Jun 7, 2024
e3037aa
Move server `HEALTHCHECK` to image definition
dabico Jun 7, 2024
e98ed36
Tweak crawler parameters
dabico Jun 7, 2024
4bbc9f2
Upgrade JRE image patch version when running back-end services
dabico Jun 7, 2024
189d602
Improve front-end setup to match that of GHS
dabico Jun 7, 2024
d62db04
Rename "Dataset Hub" to "Data Hub"
dabico Jun 7, 2024
04c9352
Upgrade liquibase to latest version in production
dabico Jun 10, 2024
ede8763
Update Maven build action
dabico Jun 10, 2024
df3ef21
Update Vue build action
dabico Jun 10, 2024
80a9497
Temporarily remove workflows
dabico Jun 10, 2024
5e826e1
Update README.md
dabico Jun 10, 2024
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
Prev Previous commit
Next Next commit
Move content area with server controls from /dashboard to /admin
  • Loading branch information
dabico committed Apr 28, 2024
commit 3061914f92515c9c67d958e5b1cb296216cfc9a4
21 changes: 21 additions & 0 deletions dl4se-website/src/assets/styles/view/admin.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@import "node_modules/bootstrap/scss/_functions.scss"
@import "node_modules/bootstrap/scss/_variables.scss"
@import "node_modules/bootstrap/scss/_mixins.scss"
@import "node_modules/bootstrap/scss/_grid.scss"

.content-area
$percentage: 25%

.btn
border-width: 2px!important

.btn.btn-danger
border-color: darken(map-get($theme-colors, "danger"), $percentage)!important

.btn.btn-secondary
border-color: darken(map-get($theme-colors, "secondary"), $percentage)!important

@include media-breakpoint-up(md)
.content-area
.btn:not(:last-child)
margin-right: map-get($spacers, 4)!important
10 changes: 10 additions & 0 deletions dl4se-website/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import VerifyView from "@/views/VerifyView";
import NotFoundView from "@/views/NotFoundView";
import CodeTaskView from "@/views/CodeTaskView";
import DownloadView from "@/views/DownloadView";
import AdminView from "@/views/AdminView";
import StatsView from "@/views/StatsView";
import AboutView from "@/views/AboutView";
import DocsView from "@/views/DocsView";
Expand Down Expand Up @@ -101,6 +102,15 @@ const routes = [
public: false,
},
},
{
path: "/admin",
name: "admin",
component: AdminView,
beforeEnter: isAdmin,
meta: {
public: false,
},
},
{
path: "/stats",
name: "stats",
Expand Down
88 changes: 88 additions & 0 deletions dl4se-website/src/views/AdminView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<template>
<div id="admin">
<h1 class="d-none">Admin</h1>
<b-container>
<b-row>
<b-col>
<h2>Server Controls</h2>
<b-content-area class="d-flex justify-content-md-start justify-content-around">
<b-button @click="shutdownServer" variant="danger">
<b-icon-power />
Shutdown
</b-button>
<b-button @click="restartServer" variant="secondary">
<b-icon-arrow-clockwise shift-h="-2" rotate="45" />
Restart
</b-button>
</b-content-area>
</b-col>
</b-row>
</b-container>
</div>
</template>

<script>
import bootstrapMixin from "@/mixins/bootstrapMixin";
import routerMixin from "@/mixins/routerMixin";
import BContentArea from "@/components/ContentArea";

export default {
components: { BContentArea },
mixins: [bootstrapMixin, routerMixin],
methods: {
async shutdownServer() {
this.showConfirmModal(
"Shut Down Server",
`You are about to shut down the server.
Doing so will cause any currently executing tasks to be suspended,
and the API unavailable until it is brought back up.
Are you sure you want to continue?`,
)
.then((confirmed) => {
return confirmed ? this.$http.post("/actuator/shutdown") : Promise.reject();
})
.then(() =>
this.redirectHomeAndToast("Shutting Down Server", "The server has been successfully shut down.", "secondary"),
)
.catch(() => {
// TODO: Differentiate between a user close and actual failure!
});
},
async restartServer() {
const restarted = await this.showConfirmModal(
"Restart Server",
`You are about to restart the server.
Doing so will cause any currently executing tasks to be temporarily suspended.
During this time the API will also be unavailable.
Are you sure you want to continue?`,
)
.then((confirmed) => {
return confirmed ? this.$http.post("/actuator/restart") : Promise.reject(false);
})
.then(() => {
this.appendToast(
"Restarting Server",
"Server restart has been initiated. It may take a moment before it becomes available again.",
"secondary",
);
return true;
})
.catch(() => false);

if (!restarted) return;
const that = this;
const check = setInterval(async function () {
await that.$http
.get("/")
.then(() => {
clearInterval(check);
that.appendToast("Server Connection Restored", "The DL4SE server is back online.", "secondary");
})
.catch(() => {});
}, 5000);
},
},
};
</script>

<style scoped lang="sass" src="@/assets/styles/view/admin.sass" />
75 changes: 0 additions & 75 deletions dl4se-website/src/views/DashboardView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,6 @@
<h3>Server Environment</h3>
<b-config-table :supplier="getConfiguration" :consumer="updateConfiguration" />
</b-container>
<b-container v-if="isAdmin">
<h3>Server Controls</h3>
<b-content-area class="d-flex justify-content-md-start justify-content-around">
<b-button @click="shutdownServer" class="btn-danger-border-2 mr-md-2">
<b-icon-power />
Shutdown
</b-button>
<b-button @click="restartServer" class="btn-secondary-border-2 ml-md-2">
<b-icon-arrow-clockwise shift-h="-2" rotate="45" />
Restart
</b-button>
</b-content-area>
</b-container>
<b-details-modal
:id="detailsModal.id"
:title="detailsModal.title"
Expand Down Expand Up @@ -297,7 +284,6 @@ import routerMixin from "@/mixins/routerMixin";
import BAbbreviation from "@/components/Abbreviation";
import BClearableInput from "@/components/ClearableInput";
import BConfigTable from "@/components/ConfigTable";
import BContentArea from "@/components/ContentArea";
import BDetailsModal from "@/components/DetailsModal";
import BDialogModal from "@/components/DialogModal";
import BIconCalendarExclamation from "@/components/IconCalendarExclamation";
Expand All @@ -312,7 +298,6 @@ export default {
BAbbreviation,
BClearableInput,
BConfigTable,
BContentArea,
BDetailsModal,
BDialogModal,
BIconCalendarExclamation,
Expand Down Expand Up @@ -528,66 +513,6 @@ export default {
const endpoint = "/admin/configuration";
return this.$http.post(endpoint, configuration).then((res) => res.data);
},
async shutdownServer() {
this.showConfirmModal(
"Shut Down Server",
"You are about to shut down the server. " +
"Doing so will cause any currently executing tasks to be suspended, " +
"and the API unavailable until it is brought back up. " +
"Are you sure you want to continue?",
)
.then((confirmed) => {
if (confirmed) {
return this.$http.post("/actuator/shutdown");
} else {
return Promise.reject();
}
})
.then(() => {
this.redirectHomeAndToast("Shutting Down Server", "The server has been successfully shut down.", "secondary");
})
.catch(() => {});
// TODO 20.10.22: Display failure toast
},
async restartServer() {
const restarted = await this.showConfirmModal(
"Restart Server",
"You are about to restart the server. " +
"Doing so will cause any currently executing tasks to be temporarily suspended. " +
"During this time the API will also be unavailable. " +
"Are you sure you want to continue?",
)
.then((confirmed) => {
if (confirmed) {
return this.$http.post("/actuator/restart");
} else {
return Promise.reject(false);
}
})
.then(() => {
this.appendToast(
"Restarting Server",
"Server restart has been initiated. It may take a moment before it becomes available again.",
"secondary",
);
return true;
})
.catch(() => {
return false;
});

if (!restarted) return;
const that = this;
const check = setInterval(async function () {
await that.$http
.get("/")
.then(() => {
clearInterval(check);
that.appendToast("Server Connection Restored", "The DL4SE server is back online.", "secondary");
})
.catch(() => {});
}, 500);
},
display(title, item, button) {
this.detailsModal.title = title;
this.detailsModal.content = item;
Expand Down