diff --git a/.env b/.env new file mode 100644 index 0000000..dab1b1d --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VITE_APP_HERMES_BACKEND_ROOT_URL='http://127.0.0.1:8000/' diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.gitignore b/.gitignore index 7bffbea..a3f7a51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,36 @@ -.DS_Store -node_modules -/dist - - -# local env files -.env.local -.env.*.local - -# Log files +# Logs +logs +*.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local # Editor directories and files +.vscode/* +!.vscode/extensions.json .idea -.vscode *.suo *.ntvs* *.njsproj *.sln *.sw? -*~ +*.tsbuildinfo + +.eslintcache + +# Cypress +/cypress/videos/ +/cypress/screenshots/ + +# Vitest +__screenshots__/ diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..29a2402 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json.schemastore.org/prettierrc", + "semi": false, + "singleQuote": true, + "printWidth": 100 +} diff --git a/README.md b/README.md index 26f8b63..9520b2c 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,48 @@ -# hermes-frontend +# hermes-frontend-new -## Project setup -``` +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). + +## Recommended Browser Setup + +- Chromium-based browsers (Chrome, Edge, Brave, etc.): + - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd) + - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters) +- Firefox: + - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/) + - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/) + +## Type Support for `.vue` Imports in TS + +TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. + +## Customize configuration + +See [Vite Configuration Reference](https://vite.dev/config/). + +## Project Setup + +```sh npm install ``` -### Compiles and hot-reloads for development -``` -npm run serve -``` +### Compile and Hot-Reload for Development -### Compiles and minifies for production +```sh +npm run dev ``` + +### Type-Check, Compile and Minify for Production + +```sh npm run build ``` -### Lints and fixes files -``` +### Lint with [ESLint](https://eslint.org/) + +```sh npm run lint ``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index e5ac36a..0000000 --- a/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - "presets": [ - "@vue/cli-plugin-babel/preset" - ] -} \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..7807d8b --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,26 @@ +import { defineConfig, globalIgnores } from 'eslint/config' +import globals from 'globals' +import js from '@eslint/js' +import pluginVue from 'eslint-plugin-vue' +import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' + +export default defineConfig([ + { + name: 'app/files-to-lint', + files: ['**/*.{js,mjs,jsx,vue}'], + }, + + globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']), + + { + languageOptions: { + globals: { + ...globals.browser, + }, + }, + }, + + js.configs.recommended, + ...pluginVue.configs['flat/essential'], + skipFormatting, +]) diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index e7b1e50..eac61e3 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "stable" description: Helm Chart for the HERMES frontend name: hermes-frontend -version: 0.2.0 +version: 0.3.0 diff --git a/helm-chart/templates/configmap.yaml b/helm-chart/templates/configmap.yaml index d67a46f..92cccb9 100644 --- a/helm-chart/templates/configmap.yaml +++ b/helm-chart/templates/configmap.yaml @@ -4,5 +4,5 @@ metadata: name: {{ include "hermes-frontend.fullname" . }} data: - env-config.js: | - _env_ = {VUE_APP_HERMES_BACKEND_ROOT_URL: "{{ .Values.hermes.backendUrl -}}" }; + .env: | + VITE_APP_HERMES_BACKEND_ROOT_URL="{{ .Values.hermes.backendUrl -}}" diff --git a/helm-chart/templates/deployment.yaml b/helm-chart/templates/deployment.yaml index ad8f723..e1c9bd8 100644 --- a/helm-chart/templates/deployment.yaml +++ b/helm-chart/templates/deployment.yaml @@ -30,7 +30,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: HERMES_BACKEND_URL + - name: VITE_APP_HERMES_BACKEND_ROOT_URL value: {{ .Values.hermes.backendUrl }} ports: - name: http @@ -48,8 +48,8 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: app-configuration - mountPath: /app/env-config.js - subPath: "env-config.js" + mountPath: /app/.env + subPath: ".env" volumes: - name: app-configuration configMap: diff --git a/index.html b/index.html new file mode 100644 index 0000000..8488875 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + +
+ + + +
+ - Upload one or more spectrum files to associate with your message. - These files will be stored in the Scimma Archive and will be publicly accessible and linked from the message. - They should follow commonly used spectrum data formats. -
-+ Upload one or more spectrum files to associate with your message. + These files will be stored in the Scimma Archive and will be publicly accessible and linked from the message. + They should follow commonly used spectrum data formats. +
+Upload one or more related target files to associate with your message. If you are submitting to the TNS, these files will be uploaded there. If your target proprietary period is 0, the files will also be stored @@ -266,150 +317,23 @@
{{ getData }}
- {{ getData }}
+ {}.
+ {authors} injects the values of the Authors field
+ {targets.0.ra} injects the first Targets RA value
+ {targets} injects the entire Targets table and all filled out associated fields
+
- If you already have an account with SCiMMA HopSkotch, simply click on
- Log in under the
- If you are new to SCiMMA HopSkotch, you will need to make an account there
- before you can log into Hermes. We’ve worked hard to make signing up easy and
- simple by using single-sign-on (SSO) technology.
-
- Click on Register under the
- If you wish to update your credentials or add topics to your account, you will - need to sign into SCiMMA Auth using - the same credentials you just used to register. -
-How do I log out of Hermes?
- Under your profile name you will see an option to log out. This will log you out of Hermes and you will become a guest user.
- However, your computer will store the cookies from CILogon, and when you log back into Hermes, you will be automatically logged on
- using the same profile as before. If you wish to log into Hermes using a different profile you will need to either close your browser
- between sessions, clear your cookies, or logout from CILogon manually before returning to Hermes.
-
† Required if submit_to_tns is set to true.
target is required when including photometry,
- spectroscopy, or astrometry data.
- † Required if submit_to_tns is set to true.
source and citation, or
- a url is required.
- ra and dec, or
- orbital_elements is required.
- † Required if submit_to_tns is set to true.
semimajor_axis and mean_anomaly, or
- both perihelion_distance and epoch_of_perihelion are required.
- † Required if submit_to_tns is set to true.
telescope or instrument is required. brightness or limiting_brightness is required.
- † Required if submit_to_tns is set to true.
telescope or instrument is required. telescope or instrument is required. flux, wavelength or files are required. † Required if submit_to_tns is set to true.
Hermes will create and store SCiMMA Credentials the first time you log in. These SCiMMA Credentials are what Hermes will use to send messages + through HopSkotch on your behalf. They include a username that you can get from your Hermes profile. In general + you shouldn't need to alter these credentials unless they somehow get in a bad state or you wish to add or remove topic permissions. If you want + to reset your credentials, simply use the button on the profile page. If you wish to change your topic permissions, use the following steps: +
+* Required.
+† Required if submit_to_tns is set to true.
* At least one target is required when including photometry,
+ spectroscopy, or astrometry data.
† Required if submit_to_tns is set to true.
+ 1,2 Either both source and citation, or a url is required.
+
+ * Required.
+ 1,2 Either both ra and dec, or
+ orbital_elements is required.
+
† Required if submit_to_tns is set to true.
+ * Required.
+ 1,2 Either both semimajor_axis and mean_anomaly, or
+ both perihelion_distance and epoch_of_perihelion are required.
+
† Required if submit_to_tns is set to true.
+ * Required.
+ 1 Either telescope or instrument is required.
+ 2 Either brightness or limiting_brightness is required.
+
† Required if submit_to_tns is set to true.
+ * Required.
+ 1 Either telescope or instrument is required.
+ 2 Either flux, wavelength or files are required.
+
† Required if submit_to_tns is set to true.
+ * Required.
+ 1 Either telescope or instrument is required.
+
{{ data.item.citation }}
- - -{{ data.item.value }}
- -{{ data.item.value }}
- -{{ jsonData.content }}
- {{ retrieveMessageError }}
++ {{ messageTitle }} +
+{{ item.citation }}
+ + +{{ item.value }}
+ + +{{ item.value }}
+ + +{{ jsonData.content }}
+ Message with UUID starting with {{ this.id }} not found, or UUID is not specific enough to specify a single message.
-Nonlocalizedevent with ID {{ this.id }} not found.
-Nonlocalizedevent with ID {{ props.id }} not found.
+