-
@@ -66,15 +73,12 @@
-
-
-
+
diff --git a/src/css/tailwind.scss b/src/css/tailwind.scss
index 6e2bb37..2529e29 100644
--- a/src/css/tailwind.scss
+++ b/src/css/tailwind.scss
@@ -1,7 +1,7 @@
@tailwind base;
@tailwind components;
-@import "@/css/_ansi.scss";
+@import '@/css/_ansi.scss';
.btn {
@apply font-bold py-2 px-4 rounded;
@@ -119,7 +119,7 @@
border-radius: 290486px;
border-right-color: transparent;
border-top-color: transparent;
- content: "";
+ content: '';
display: block;
width: 1em;
height: 1em;
diff --git a/src/main.js b/src/main.js
index 6b89bf4..3a4849a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,11 +1,11 @@
-import "@/css/tailwind.scss";
-import { getUser } from "@/util/auth";
-import "@mdi/font/css/materialdesignicons.css";
-import Vue from "vue";
-import Vue2Filters from "vue2-filters";
-import App from "./App.vue";
-import router from "./router";
-import store from "./store";
+import '@/css/tailwind.scss';
+import { getUser } from '@/util/auth';
+import '@mdi/font/css/materialdesignicons.css';
+import Vue from 'vue';
+import Vue2Filters from 'vue2-filters';
+import App from './App.vue';
+import router from './router';
+import store from './store';
Vue.use(Vue2Filters);
@@ -13,12 +13,12 @@ Vue.use(Vue2Filters);
new Vue({
router,
store,
- created: function() {
+ created: function () {
let user = getUser();
if (user) {
- store.dispatch("setUser", user);
+ store.dispatch('setUser', user);
}
- store.dispatch("setRegisterUser", null);
+ store.dispatch('setRegisterUser', null);
},
- render: h => h(App)
-}).$mount("#app");
+ render: (h) => h(App),
+}).$mount('#app');
diff --git a/src/router.js b/src/router.js
index 1afa28e..a8e48f9 100644
--- a/src/router.js
+++ b/src/router.js
@@ -1,249 +1,348 @@
-import Vue from "vue";
-import VueRouter from "vue-router";
-import Home from "./views/Home.vue";
-import User from "./views/User.vue";
-import Org from "./views/Org.vue";
-import Project from "./views/Project.vue";
-import ProjectGroup from "./views/ProjectGroup.vue";
-import AddLinkedAccount from "./views/AddLinkedAccount.vue";
-import usersettings from "./components/usersettings.vue";
-import projects from "./components/projects.vue";
-import projectsettings from "./components/projectsettings.vue";
-import projectgroupsettings from "./components/projectgroupsettings.vue";
-import createproject from "./components/createproject.vue";
-import createprojectgroup from "./components/createprojectgroup.vue";
-import createorganization from "./components/createorganization.vue";
-import orgmembers from "./components/orgmembers.vue";
-import runs from "./components/runs.vue";
-import runsummary from "./components/runsummary.vue";
-import tasksummary from "./components/tasksummary.vue";
-import Oauth2 from "./views/Oauth2.vue";
-import Register from "./views/Register.vue";
-import Login from "./views/Login.vue";
-import Logout from "./views/Logout.vue";
-import CreateSource from "./views/CreateSource.vue";
+import Vue from 'vue';
+import VueRouter from 'vue-router';
+import Home from './views/Home.vue';
+import User from './views/User.vue';
+import Org from './views/Org.vue';
+import Project from './views/Project.vue';
+import ProjectGroup from './views/ProjectGroup.vue';
+import AddLinkedAccount from './views/AddLinkedAccount.vue';
+import usersettings from './components/usersettings.vue';
+import projects from './components/projects.vue';
+import projectsettings from './components/projectsettings.vue';
+import projectgroupsettings from './components/projectgroupsettings.vue';
+import createproject from './components/createproject.vue';
+import createprojectgroup from './components/createprojectgroup.vue';
+import createorganization from './components/createorganization.vue';
+import orgmembers from './components/orgmembers.vue';
+import runs from './components/runs.vue';
+import runsummary from './components/runsummary.vue';
+import tasksummary from './components/tasksummary.vue';
+import Oauth2 from './views/Oauth2.vue';
+import Register from './views/Register.vue';
+import Login from './views/Login.vue';
+import Logout from './views/Logout.vue';
+import CreateSource from './views/CreateSource.vue';
-import { parseRef, projectRunLink } from "@/util/link.js";
-import { fetchProject } from "@/util/data.js";
+import { parseRef, projectRunLink } from '@/util/link.js';
+import { fetchProject } from '@/util/data.js';
-import store from "./store";
+import store from './store';
Vue.use(VueRouter);
const router = new VueRouter({
- mode: "history",
+ mode: 'history',
routes: [
{
- path: "/register",
- name: "register",
+ path: '/register',
+ name: 'register',
component: Register,
},
{
- path: "/newsource",
- name: "newsource",
+ path: '/newsource',
+ name: 'newsource',
component: CreateSource,
},
{
- path: "/login",
- name: "login",
- component: Login
+ path: '/login',
+ name: 'login',
+ component: Login,
},
{
- path: "/logout",
- name: "logout",
- component: Logout
+ path: '/logout',
+ name: 'logout',
+ component: Logout,
},
{
- path: "/oauth2/callback",
- name: "oauth2callback",
- component: Oauth2
+ path: '/oauth2/callback',
+ name: 'oauth2callback',
+ component: Oauth2,
},
{
- path: "/",
- name: "home",
- component: Home
+ path: '/',
+ name: 'home',
+ component: Home,
},
{
- path: "/neworganization",
+ path: '/neworganization',
component: createorganization,
},
{
- path: "/user/:username",
+ path: '/user/:username',
component: User,
props: (route) => ({ username: route.params.username }),
children: [
{
- path: "",
- name: "user",
+ path: '',
+ name: 'user',
component: projects,
- props: (route) => ({ ownertype: "user", ownername: route.params.username })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ }),
},
{
- path: "projects",
- name: "user projects",
+ path: 'projects',
+ name: 'user projects',
component: projects,
- props: (route) => ({ ownertype: "user", ownername: route.params.username })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ }),
},
{
- path: "runs",
- name: "user direct runs",
+ path: 'runs',
+ name: 'user direct runs',
component: runs,
- props: (route) => ({ ownertype: "user", ownername: route.params.username })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ }),
},
{
- path: "runs/:runid",
- name: "user direct run",
+ path: 'runs/:runid',
+ name: 'user direct run',
component: runsummary,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, runid: route.params.runid })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ runid: route.params.runid,
+ }),
},
{
- path: "runs/:runid/tasks/:taskid",
- name: "user direct run task",
+ path: 'runs/:runid/tasks/:taskid',
+ name: 'user direct run task',
component: tasksummary,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, runid: route.params.runid, taskid: route.params.taskid })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ runid: route.params.runid,
+ taskid: route.params.taskid,
+ }),
},
{
- path: "settings",
- name: "user settings",
+ path: 'settings',
+ name: 'user settings',
component: usersettings,
props: (route) => ({ username: route.params.username }),
},
{
- path: "linkedaccounts/add/:remotesource",
- name: "user add linked account",
+ path: 'linkedaccounts/add/:remotesource',
+ name: 'user add linked account',
component: AddLinkedAccount,
- props: (route) => ({ username: route.params.username, remoteSourceName: route.params.remotesource })
+ props: (route) => ({
+ username: route.params.username,
+ remoteSourceName: route.params.remotesource,
+ }),
},
{
- path: "createprojectgroup",
- name: "user create project group",
+ path: 'createprojectgroup',
+ name: 'user create project group',
component: createprojectgroup,
- props: (route) => ({ ownertype: "user", ownername: route.params.username })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ }),
},
{
- path: "createproject",
- name: "user create project",
+ path: 'createproject',
+ name: 'user create project',
component: createproject,
- props: (route) => ({ ownertype: "user", ownername: route.params.username })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ }),
},
- ]
+ ],
},
{
- path: "/user/:username/projects/:projectref(.*\\.proj)",
+ path: '/user/:username/projects/:projectref(.*\\.proj)',
component: Project,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref) }),
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ }),
children: [
{
- path: "",
- name: "user project",
+ path: '',
+ name: 'user project',
component: runs,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref) })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ }),
},
{
- path: "runs",
- name: "user project runs",
+ path: 'runs',
+ name: 'user project runs',
component: runs,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref) })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ }),
},
{
- path: "branches",
- name: "user project branches runs",
+ path: 'branches',
+ name: 'user project branches runs',
component: runs,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref), query: "branches" })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ query: 'branches',
+ }),
},
{
- path: "tags",
- name: "user project tags runs",
+ path: 'tags',
+ name: 'user project tags runs',
component: runs,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref), query: "tags" })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ query: 'tags',
+ }),
},
{
- path: "pullrequests",
- name: "user project pull requests runs",
+ path: 'pullrequests',
+ name: 'user project pull requests runs',
component: runs,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref), query: "pullrequests" })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ query: 'pullrequests',
+ }),
},
{
- path: "runs/:runid",
- name: "user project run",
+ path: 'runs/:runid',
+ name: 'user project run',
component: runsummary,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref), runid: route.params.runid })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ runid: route.params.runid,
+ }),
},
{
- path: "runs/:runid/tasks/:taskid",
- name: "user project run task",
+ path: 'runs/:runid/tasks/:taskid',
+ name: 'user project run task',
component: tasksummary,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref), runid: route.params.runid, taskid: route.params.taskid })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ runid: route.params.runid,
+ taskid: route.params.taskid,
+ }),
},
{
- path: "settings",
- name: "user project settings",
+ path: 'settings',
+ name: 'user project settings',
component: projectsettings,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectref: parseRef(route.params.projectref) })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectref: parseRef(route.params.projectref),
+ }),
},
- ]
+ ],
},
{
- path: "/user/:username/projectgroups/:projectgroupref(.*\\.proj)",
+ path: '/user/:username/projectgroups/:projectgroupref(.*\\.proj)',
component: ProjectGroup,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectgroupref: parseRef(route.params.projectgroupref) }),
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
children: [
{
- path: "",
- name: "user project group",
+ path: '',
+ name: 'user project group',
component: projects,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectgroupref: parseRef(route.params.projectgroupref) }),
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "projects",
- name: "user project group projects",
+ path: 'projects',
+ name: 'user project group projects',
component: projects,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "settings",
- name: "user project group settings",
+ path: 'settings',
+ name: 'user project group settings',
component: projectgroupsettings,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "createprojectgroup",
- name: "user project group create project group",
+ path: 'createprojectgroup',
+ name: 'user project group create project group',
component: createprojectgroup,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "createproject",
- name: "user project group create project",
+ path: 'createproject',
+ name: 'user project group create project',
component: createproject,
- props: (route) => ({ ownertype: "user", ownername: route.params.username, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'user',
+ ownername: route.params.username,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
- ]
+ ],
},
{
- path: "/org/:orgname",
+ path: '/org/:orgname',
component: Org,
props: (route) => ({ orgname: route.params.orgname }),
children: [
{
- path: "",
- name: "org",
+ path: '',
+ name: 'org',
component: projects,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ }),
},
{
- path: "projects",
- name: "org projects",
+ path: 'projects',
+ name: 'org projects',
component: projects,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ }),
},
{
- path: "members",
- name: "org members",
+ path: 'members',
+ name: 'org members',
component: orgmembers,
- props: (route) => ({ orgname: route.params.orgname })
+ props: (route) => ({ orgname: route.params.orgname }),
},
/* {
path: "settings",
@@ -252,141 +351,213 @@ const router = new VueRouter({
props: (route) => ({ username: route.params.username }),
}, */
{
- path: "createprojectgroup",
- name: "org create project group",
+ path: 'createprojectgroup',
+ name: 'org create project group',
component: createprojectgroup,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ }),
},
{
- path: "createproject",
- name: "org create project",
+ path: 'createproject',
+ name: 'org create project',
component: createproject,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ }),
},
- ]
+ ],
},
{
- path: "/org/:orgname/projects/:projectref(.*\\.proj)",
+ path: '/org/:orgname/projects/:projectref(.*\\.proj)',
component: Project,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref) }),
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ }),
children: [
{
- path: "",
- name: "org project",
+ path: '',
+ name: 'org project',
component: runs,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref) })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ }),
},
{
- path: "runs",
- name: "org project runs",
+ path: 'runs',
+ name: 'org project runs',
component: runs,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref) })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ }),
},
{
- path: "branches",
- name: "org project branches runs",
+ path: 'branches',
+ name: 'org project branches runs',
component: runs,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref), query: "branches" })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ query: 'branches',
+ }),
},
{
- path: "tags",
- name: "org project tags runs",
+ path: 'tags',
+ name: 'org project tags runs',
component: runs,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref), query: "tags" })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ query: 'tags',
+ }),
},
{
- path: "pullrequests",
- name: "org project pull requests runs",
+ path: 'pullrequests',
+ name: 'org project pull requests runs',
component: runs,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref), query: "pullrequests" })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ query: 'pullrequests',
+ }),
},
{
- path: "runs/:runid",
- name: "org project run",
+ path: 'runs/:runid',
+ name: 'org project run',
component: runsummary,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref), runid: route.params.runid })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ runid: route.params.runid,
+ }),
},
{
- path: "runs/:runid/tasks/:taskid",
- name: "org project run task",
+ path: 'runs/:runid/tasks/:taskid',
+ name: 'org project run task',
component: tasksummary,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref), runid: route.params.runid, taskid: route.params.taskid })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ runid: route.params.runid,
+ taskid: route.params.taskid,
+ }),
},
{
- path: "settings",
- name: "org project settings",
+ path: 'settings',
+ name: 'org project settings',
component: projectsettings,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectref: parseRef(route.params.projectref) })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectref: parseRef(route.params.projectref),
+ }),
},
- ]
+ ],
},
{
- path: "/org/:orgname/projectgroups/:projectgroupref(.*\\.proj)",
+ path: '/org/:orgname/projectgroups/:projectgroupref(.*\\.proj)',
component: ProjectGroup,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectgroupref: parseRef(route.params.projectgroupref) }),
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
children: [
{
- path: "",
- name: "org project group",
+ path: '',
+ name: 'org project group',
component: projects,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectgroupref: parseRef(route.params.projectgroupref) }),
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "projects",
- name: "org project group projects",
+ path: 'projects',
+ name: 'org project group projects',
component: projects,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "settings",
- name: "org project group settings",
+ path: 'settings',
+ name: 'org project group settings',
component: projectgroupsettings,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "createprojectgroup",
- name: "org project group create project group",
+ path: 'createprojectgroup',
+ name: 'org project group create project group',
component: createprojectgroup,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
{
- path: "createproject",
- name: "org project group create project",
+ path: 'createproject',
+ name: 'org project group create project',
component: createproject,
- props: (route) => ({ ownertype: "org", ownername: route.params.orgname, projectgroupref: parseRef(route.params.projectgroupref) })
+ props: (route) => ({
+ ownertype: 'org',
+ ownername: route.params.orgname,
+ projectgroupref: parseRef(route.params.projectgroupref),
+ }),
},
- ]
+ ],
},
- ]
+ ],
});
router.beforeEach(async (to, from, next) => {
- store.dispatch("setError", null);
+ store.dispatch('setError', null);
- const { path, query } = to
+ const { path, query } = to;
- if (path == "/run") {
+ if (path == '/run') {
// generic run handler by projectref and runid
- let projectref = query.projectref
- let runid = query.runid
+ let projectref = query.projectref;
+ let runid = query.runid;
let { data, error } = await fetchProject(projectref);
if (error) {
- this.$store.dispatch("setError", error);
+ this.$store.dispatch('setError', error);
return;
}
let project = data;
- let parts = project.path.split("/")
- let nextPath = projectRunLink(parts[0], parts[1], parts.slice(2), runid)
+ let parts = project.path.split('/');
+ let nextPath = projectRunLink(parts[0], parts[1], parts.slice(2), runid);
- next({ path: nextPath.path, replace: true })
+ next({ path: nextPath.path, replace: true });
}
- next()
-})
+ next();
+});
-export default router
+export default router;
diff --git a/src/store.js b/src/store.js
index 3369abf..46ff83f 100644
--- a/src/store.js
+++ b/src/store.js
@@ -1,55 +1,54 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
+import Vue from 'vue';
+import Vuex from 'vuex';
-Vue.use(Vuex)
+Vue.use(Vuex);
const state = {
- error: null,
- user: null,
- registeruser: null,
-}
+ error: null,
+ user: null,
+ registeruser: null,
+};
const getters = {
- // global error
- error: state => {
- return state.error
- },
- user: state => {
- return state.user
- },
- registeruser: state => {
- return state.registeruser
- }
-}
+ // global error
+ error: (state) => {
+ return state.error;
+ },
+ user: (state) => {
+ return state.user;
+ },
+ registeruser: (state) => {
+ return state.registeruser;
+ },
+};
const mutations = {
- setError(state, error) {
- state.error = error
- },
- setUser(state, user) {
- state.user = user
- },
- setRegisterUser(state, user) {
- state.registeruser = user
- }
-}
+ setError(state, error) {
+ state.error = error;
+ },
+ setUser(state, user) {
+ state.user = user;
+ },
+ setRegisterUser(state, user) {
+ state.registeruser = user;
+ },
+};
const actions = {
- setError({ commit }, error) {
- commit('setError', error)
- },
- setUser({ commit }, user) {
- commit('setUser', user)
- },
- setRegisterUser({ commit }, user) {
- commit('setRegisterUser', user)
- }
-}
-
+ setError({ commit }, error) {
+ commit('setError', error);
+ },
+ setUser({ commit }, user) {
+ commit('setUser', user);
+ },
+ setRegisterUser({ commit }, user) {
+ commit('setRegisterUser', user);
+ },
+};
export default new Vuex.Store({
- state,
- getters,
- actions,
- mutations,
-})
+ state,
+ getters,
+ actions,
+ mutations,
+});
diff --git a/src/util/auth.js b/src/util/auth.js
index 1ffe81e..1e795f4 100644
--- a/src/util/auth.js
+++ b/src/util/auth.js
@@ -1,8 +1,8 @@
-import store from "@/store";
+import store from '@/store';
-const ID_TOKEN_KEY = "id_token";
-const USER_KEY = "user";
-const LOGIN_REDIRECT_KEY = "login_redirect";
+const ID_TOKEN_KEY = 'id_token';
+const USER_KEY = 'user';
+const LOGIN_REDIRECT_KEY = 'login_redirect';
let API_URL = window.CONFIG.API_URL;
let API_BASE_PATH = window.CONFIG.API_BASE_PATH;
@@ -10,20 +10,20 @@ let API_BASE_PATH = window.CONFIG.API_BASE_PATH;
export function setLoggedUser(token, user) {
setIdToken(token);
setUser(user);
- store.dispatch("setUser", user);
+ store.dispatch('setUser', user);
}
export function doLogout() {
unsetIdToken();
unsetUser();
- store.dispatch("setUser", null);
+ store.dispatch('setUser', null);
}
export function apiurlwithtoken(path) {
let u = new URL(API_URL + API_BASE_PATH + path);
let idToken = getIdToken();
if (idToken) {
- u.searchParams.append("access_token", idToken);
+ u.searchParams.append('access_token', idToken);
}
return u;
}
@@ -33,19 +33,19 @@ export function apiurl(path) {
}
export function loginurl() {
- return apiurl("/auth/login");
+ return apiurl('/auth/login');
}
export function authorizeurl() {
- return apiurl("/auth/authorize");
+ return apiurl('/auth/authorize');
}
export function registerurl() {
- return new apiurl("/auth/register");
+ return new apiurl('/auth/register');
}
export function oauth2callbackurl() {
- return new apiurl("/auth/oauth2/callback");
+ return new apiurl('/auth/oauth2/callback');
}
export async function loginapi(init) {
@@ -64,19 +64,19 @@ export async function registerapi(init) {
return await window.fetch(registerurl(), init);
}
-export async function fetch(url, init, signal, token, tokenType = "bearer") {
+export async function fetch(url, init, signal, token, tokenType = 'bearer') {
if (!init) {
init = {};
}
if (init.headers === undefined) {
- init["headers"] = {};
+ init['headers'] = {};
}
if (signal) {
- init["signal"] = signal;
+ init['signal'] = signal;
}
let idToken = token || getIdToken();
if (idToken) {
- init.headers["Authorization"] = tokenType + " " + idToken;
+ init.headers['Authorization'] = tokenType + ' ' + idToken;
}
return await window.fetch(url, init);
diff --git a/src/util/data.js b/src/util/data.js
index d006e39..7b4260e 100644
--- a/src/util/data.js
+++ b/src/util/data.js
@@ -1,8 +1,9 @@
-import router from "@/router";
-import { apiurl, fetch as authfetch, loginapi, registerapi } from "@/util/auth";
+import router from '@/router';
+import { apiurl, fetch as authfetch, loginapi, registerapi } from '@/util/auth';
-export const GITHUB_API_URL = "https://api.github.com";
-export const GITHUB_SSH_KEY = "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==";
+export const GITHUB_API_URL = 'https://api.github.com';
+export const GITHUB_SSH_KEY =
+ 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==';
export async function fetch(url, init, signal, token, tokenType) {
try {
@@ -10,8 +11,8 @@ export async function fetch(url, init, signal, token, tokenType) {
if (!res.ok) {
if (res.status === 401) {
router.push({
- name: "login",
- query: { redirect: router.currentRoute.fullPath }
+ name: 'login',
+ query: { redirect: router.currentRoute.fullPath },
});
// if we return a response containing an error what happens is
// that router.push mounts the login view before the calling
@@ -36,21 +37,21 @@ export async function fetch(url, init, signal, token, tokenType) {
return { data: await res.json(), error: null };
}
} catch (e) {
- if (e.name == "AbortError") {
+ if (e.name == 'AbortError') {
return { data: null, error: null, aborted: true };
}
- return { data: null, error: "api call failed: " + e.message };
+ return { data: null, error: 'api call failed: ' + e.message };
}
}
export async function login(username, password, remotesourcename) {
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
remote_source_name: remotesourcename,
login_name: username,
- password: password
- })
+ password: password,
+ }),
};
try {
@@ -62,7 +63,7 @@ export async function login(username, password, remotesourcename) {
return { data: await res.json(), error: null };
}
} catch (e) {
- return { data: null, error: "api call failed: " + e.message };
+ return { data: null, error: 'api call failed: ' + e.message };
}
}
@@ -73,13 +74,13 @@ export async function register(
remotepassword
) {
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
username: username,
remote_source_name: remotesourcename,
remote_source_login_name: remoteloginname,
- remote_source_login_password: remotepassword
- })
+ remote_source_login_password: remotepassword,
+ }),
};
try {
@@ -91,111 +92,122 @@ export async function register(
return { data: await res.json(), error: null };
}
} catch (e) {
- return { data: null, error: "api call failed: " + e.message };
+ return { data: null, error: 'api call failed: ' + e.message };
}
}
export async function fetchCurrentUser(signal) {
- let path = "/user";
+ let path = '/user';
return await fetch(apiurl(path), null, signal);
}
export async function fetchOrgMembers(orgref, signal) {
- let path = "/orgs/" + orgref + "/members";
+ let path = '/orgs/' + orgref + '/members';
return await fetch(apiurl(path), null, signal);
}
export async function fetchRuns(group, startRunID, lastrun, signal) {
- let u = apiurl("/runs");
+ let u = apiurl('/runs');
if (group) {
- u.searchParams.append("group", group);
+ u.searchParams.append('group', group);
}
if (lastrun) {
- u.searchParams.append("lastrun", true);
+ u.searchParams.append('lastrun', true);
}
if (startRunID) {
- u.searchParams.append("start", startRunID);
+ u.searchParams.append('start', startRunID);
}
return await fetch(u, null, signal);
}
export async function fetchRun(runid, signal) {
- return await fetch(apiurl("/runs/" + runid), null, signal);
+ return await fetch(apiurl('/runs/' + runid), null, signal);
}
export async function fetchTask(runid, taskid, signal) {
- return await fetch(apiurl("/runs/" + runid + "/tasks/" + taskid), signal);
+ return await fetch(apiurl('/runs/' + runid + '/tasks/' + taskid), signal);
}
export async function fetchUser(username, signal) {
- let path = "/users/" + username;
+ let path = '/users/' + username;
return await fetch(apiurl(path), null, signal);
}
export async function fetchProjectGroup(projectgroupref, signal) {
- let path = "/projectgroups/" + encodeURIComponent(projectgroupref);
+ let path = '/projectgroups/' + encodeURIComponent(projectgroupref);
return await fetch(apiurl(path), null, signal);
}
export async function fetchProjectGroupSubgroups(projectgroupref, signal) {
- let path = "/projectgroups/" + encodeURIComponent(projectgroupref);
- path += "/subgroups";
+ let path = '/projectgroups/' + encodeURIComponent(projectgroupref);
+ path += '/subgroups';
return await fetch(apiurl(path), null, signal);
}
export async function fetchProjectGroupProjects(projectgroupref, signal) {
- let path = "/projectgroups/" + encodeURIComponent(projectgroupref);
- path += "/projects";
+ let path = '/projectgroups/' + encodeURIComponent(projectgroupref);
+ path += '/projects';
return await fetch(apiurl(path), null, signal);
}
export async function fetchProject(ref, signal) {
- let path = "/projects/" + encodeURIComponent(ref);
+ let path = '/projects/' + encodeURIComponent(ref);
return await fetch(apiurl(path), null, signal);
}
export async function fetchSecrets(ownertype, ref, all, signal) {
let path;
- if (ownertype == "project") {
- path = "/projects/";
- } else if (ownertype == "projectgroup") {
- path = "/projectgroups/";
+ if (ownertype == 'project') {
+ path = '/projects/';
+ } else if (ownertype == 'projectgroup') {
+ path = '/projectgroups/';
}
path += encodeURIComponent(ref);
- path += "/secrets";
+ path += '/secrets';
if (all) {
- path += "?tree&removeoverridden";
+ path += '?tree&removeoverridden';
}
return await fetch(apiurl(path), null, signal);
}
export async function fetchVariables(ownertype, ref, all, signal) {
let path;
- if (ownertype == "project") {
- path = "/projects/";
- } else if (ownertype == "projectgroup") {
- path = "/projectgroups/";
+ if (ownertype == 'project') {
+ path = '/projects/';
+ } else if (ownertype == 'projectgroup') {
+ path = '/projectgroups/';
}
path += encodeURIComponent(ref);
- path += "/variables";
+ path += '/variables';
if (all) {
- path += "?tree&removeoverridden";
+ path += '?tree&removeoverridden';
}
return await fetch(apiurl(path), null, signal);
}
export async function createRemoteSource(
- token, type, name, clientID, clientSecret, apiURL, authType, skipVerify,
- sshHostKey, skipSshHostKeyCheck, registrationEnabled, loginEnabled, signal,
+ token,
+ type,
+ name,
+ clientID,
+ clientSecret,
+ apiURL,
+ authType,
+ skipVerify,
+ sshHostKey,
+ skipSshHostKeyCheck,
+ registrationEnabled,
+ loginEnabled,
+ signal
) {
- let path = "/remotesources";
+ let path = '/remotesources';
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
name,
apiurl: apiURL,
@@ -208,38 +220,38 @@ export async function createRemoteSource(
oauth_2_client_secret: clientSecret,
registration_enabled: registrationEnabled,
login_enabled: loginEnabled,
- })
+ }),
};
- return await fetch(apiurl(path), init, signal, token, "token");
+ return await fetch(apiurl(path), init, signal, token, 'token');
}
export async function createOrganization(orgname, visibility, signal) {
- let path = "/orgs";
+ let path = '/orgs';
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
name: orgname,
- visibility: visibility
- })
+ visibility: visibility,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function createUserToken(username, tokenname, signal) {
- let path = "/users/" + username + "/tokens";
+ let path = '/users/' + username + '/tokens';
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
- token_name: tokenname
- })
+ token_name: tokenname,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function deleteUserToken(username, tokenname, signal) {
- let path = "/users/" + username + "/tokens/" + tokenname;
+ let path = '/users/' + username + '/tokens/' + tokenname;
let init = {
- method: "DELETE"
+ method: 'DELETE',
};
return await fetch(apiurl(path), init, signal);
}
@@ -251,90 +263,90 @@ export async function createUserLinkedAccount(
password,
signal
) {
- let path = "/users/" + username + "/linkedaccounts";
+ let path = '/users/' + username + '/linkedaccounts';
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
remote_source_name: remotesourcename,
remote_source_login_name: loginname,
- remote_source_login_password: password
- })
+ remote_source_login_password: password,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function deleteLinkedAccount(username, laid, signal) {
- let path = "/users/" + username + "/linkedaccounts/" + laid;
+ let path = '/users/' + username + '/linkedaccounts/' + laid;
let init = {
- method: "DELETE"
+ method: 'DELETE',
};
return await fetch(apiurl(path), init, signal);
}
export async function restartRun(runid, fromStart, signal) {
- let path = "/runs/" + runid + "/actions";
+ let path = '/runs/' + runid + '/actions';
let init = {
- method: "PUT",
+ method: 'PUT',
body: JSON.stringify({
- action_type: "restart",
- from_start: fromStart
- })
+ action_type: 'restart',
+ from_start: fromStart,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function cancelRun(runid, signal) {
- let path = "/runs/" + runid + "/actions";
+ let path = '/runs/' + runid + '/actions';
let init = {
- method: "PUT",
+ method: 'PUT',
body: JSON.stringify({
- action_type: "cancel"
- })
+ action_type: 'cancel',
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function stopRun(runid, signal) {
- let path = "/runs/" + runid + "/actions";
+ let path = '/runs/' + runid + '/actions';
let init = {
- method: "PUT",
+ method: 'PUT',
body: JSON.stringify({
- action_type: "stop"
- })
+ action_type: 'stop',
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function approveTask(runid, taskid, signal) {
- let path = "/runs/" + runid + "/tasks/" + taskid + "/actions";
+ let path = '/runs/' + runid + '/tasks/' + taskid + '/actions';
let init = {
- method: "PUT",
+ method: 'PUT',
body: JSON.stringify({
- action_type: "approve"
- })
+ action_type: 'approve',
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function fetchRemoteSources(signal) {
- let path = "/remotesources";
+ let path = '/remotesources';
return await fetch(apiurl(path), null, signal);
}
export async function userRemoteRepos(remotesourceid, signal) {
- let path = "/user/remoterepos/" + remotesourceid;
+ let path = '/user/remoterepos/' + remotesourceid;
return await fetch(apiurl(path, null, signal));
}
export async function createProjectGroup(parentref, name, visibility, signal) {
- let path = "/projectgroups";
+ let path = '/projectgroups';
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
name: name,
parent_ref: parentref,
- visibility: visibility
- })
+ visibility: visibility,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
@@ -345,13 +357,13 @@ export async function updateProjectGroup(
visibility,
signal
) {
- let path = "/projectgroups/" + encodeURIComponent(projectgroupref);
+ let path = '/projectgroups/' + encodeURIComponent(projectgroupref);
let init = {
- method: "PUT",
+ method: 'PUT',
body: JSON.stringify({
name: name,
- visibility: visibility
- })
+ visibility: visibility,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
@@ -365,56 +377,61 @@ export async function createProject(
passvarstoforkedpr,
signal
) {
- let path = "/projects";
+ let path = '/projects';
let init = {
- method: "POST",
+ method: 'POST',
body: JSON.stringify({
name: name,
parent_ref: parentref,
visibility: visibility,
remote_source_name: remotesourcename,
repo_path: remoterepopath,
- pass_vars_to_forked_pr: passvarstoforkedpr
- })
+ pass_vars_to_forked_pr: passvarstoforkedpr,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
-export async function updateProject(projectref, name, visibility, passvarstoforkedpr, signal) {
- let path = "/projects/" + encodeURIComponent(projectref);
+export async function updateProject(
+ projectref,
+ name,
+ visibility,
+ passvarstoforkedpr,
+ signal
+) {
+ let path = '/projects/' + encodeURIComponent(projectref);
let init = {
- method: "PUT",
+ method: 'PUT',
body: JSON.stringify({
name: name,
visibility: visibility,
- pass_vars_to_forked_pr: passvarstoforkedpr
- })
+ pass_vars_to_forked_pr: passvarstoforkedpr,
+ }),
};
return await fetch(apiurl(path), init, signal);
}
export async function deleteProject(projectref, signal) {
- let path = "/projects/" + encodeURIComponent(projectref);
+ let path = '/projects/' + encodeURIComponent(projectref);
let init = {
- method: "DELETE"
+ method: 'DELETE',
};
return await fetch(apiurl(path), init, signal);
}
export async function projectUpdateRepoLinkedAccount(projectref, signal) {
let path =
- "/projects/" + encodeURIComponent(projectref) + "/updaterepolinkedaccount";
+ '/projects/' + encodeURIComponent(projectref) + '/updaterepolinkedaccount';
let init = {
- method: "PUT"
+ method: 'PUT',
};
return await fetch(apiurl(path), init, signal);
}
export async function deleteProjectGroup(projectgroupref, signal) {
- let path = "/projectgroups/" + encodeURIComponent(projectgroupref);
+ let path = '/projectgroups/' + encodeURIComponent(projectgroupref);
let init = {
- method: "DELETE"
+ method: 'DELETE',
};
return await fetch(apiurl(path), init, signal);
}
-
diff --git a/src/util/link.js b/src/util/link.js
index 35734f8..78289d3 100644
--- a/src/util/link.js
+++ b/src/util/link.js
@@ -1,130 +1,173 @@
export function parseRef(ref) {
- ref = ref.replace(/\.proj/, "")
- // return empty array or split return an array with the empty element
- if (!ref) {
- return []
- }
- return ref.split("/")
+ ref = ref.replace(/\.proj/, '');
+ // return empty array or split return an array with the empty element
+ if (!ref) {
+ return [];
+ }
+ return ref.split('/');
}
export function ownerLink(ownertype, ownername) {
- if (ownertype == "user") {
- return { name: ownertype, params: { username: ownername } }
- } else if (ownertype == "org") {
- return { name: ownertype, params: { orgname: ownername } }
- }
+ if (ownertype == 'user') {
+ return { name: ownertype, params: { username: ownername } };
+ } else if (ownertype == 'org') {
+ return { name: ownertype, params: { orgname: ownername } };
+ }
}
export function ownerProjectsLink(ownertype, ownername) {
- return { name: ownertype + " projects", params: { ownername: ownername } }
+ return { name: ownertype + ' projects', params: { ownername: ownername } };
}
export function ownerSettingsLink(ownertype, ownername) {
- if (ownertype == "user") {
- return { name: ownertype + " settings", params: { username: ownername } }
- } else if (ownertype == "org") {
- return { name: ownertype + " settings", params: { orgname: ownername } }
- }
+ if (ownertype == 'user') {
+ return { name: ownertype + ' settings', params: { username: ownername } };
+ } else if (ownertype == 'org') {
+ return { name: ownertype + ' settings', params: { orgname: ownername } };
+ }
}
export function userDirectRunsLink(username) {
- return { name: "user direct runs", params: { username: username } }
+ return { name: 'user direct runs', params: { username: username } };
}
export function userDirectRunLink(username, runid) {
- return { name: "user direct run", params: { username: username, runid: runid } }
+ return {
+ name: 'user direct run',
+ params: { username: username, runid: runid },
+ };
}
export function userDirectRunTaskLink(username, runid, taskid) {
- return { name: "user direct run task", params: { username: username, runid: runid, taskid: taskid } }
+ return {
+ name: 'user direct run task',
+ params: { username: username, runid: runid, taskid: taskid },
+ };
}
export function userAddLinkedAccountLink(username, remotesourcename) {
- return { name: "user add linked account", params: { username: username, remotesource: remotesourcename } }
+ return {
+ name: 'user add linked account',
+ params: { username: username, remotesource: remotesourcename },
+ };
}
export function orgMembersLink(orgname) {
- return { name: "org members", params: { orgname: orgname } }
+ return { name: 'org members', params: { orgname: orgname } };
}
// Note, when creating a router link containing a project/projectgroup ref (a
// path), unfortunately, we cannot use route name and params since it will path
// escape it
export function projectGroupPath(ownertype, ownername, projectgroupref) {
- let path = `/${ownertype}/${ownername}`
- // root project group will have a .proj without a name
- let projectgrouppath = (projectgroupref.join("/") + ".proj")
- path = `${path}/projectgroups/${projectgrouppath}`
- return path
+ let path = `/${ownertype}/${ownername}`;
+ // root project group will have a .proj without a name
+ let projectgrouppath = projectgroupref.join('/') + '.proj';
+ path = `${path}/projectgroups/${projectgrouppath}`;
+ return path;
}
export function projectPath(ownertype, ownername, projectref) {
- let path = `/${ownertype}/${ownername}`
- let projectpath = (projectref.join("/") + ".proj")
- path = `${path}/projects/${projectpath}`
- return path
+ let path = `/${ownertype}/${ownername}`;
+ let projectpath = projectref.join('/') + '.proj';
+ path = `${path}/projects/${projectpath}`;
+ return path;
}
export function projectGroupLink(ownertype, ownername, projectgroupref) {
- return { path: projectGroupPath(ownertype, ownername, projectgroupref) }
+ return { path: projectGroupPath(ownertype, ownername, projectgroupref) };
}
-export function projectGroupProjectsLink(ownertype, ownername, projectgroupref) {
- let projectgrouppath = (projectgroupref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projectgroups/${projectgrouppath}/projects` }
+export function projectGroupProjectsLink(
+ ownertype,
+ ownername,
+ projectgroupref
+) {
+ let projectgrouppath = projectgroupref.join('/') + '.proj';
+ return {
+ path: `/${ownertype}/${ownername}/projectgroups/${projectgrouppath}/projects`,
+ };
}
export function projectLink(ownertype, ownername, projectref) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}` }
+ let projectpath = projectref.join('/') + '.proj';
+ return { path: `/${ownertype}/${ownername}/projects/${projectpath}` };
}
export function projectRunsLink(ownertype, ownername, projectref) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}/runs` }
+ let projectpath = projectref.join('/') + '.proj';
+ return { path: `/${ownertype}/${ownername}/projects/${projectpath}/runs` };
}
export function projectBranchesRunsLink(ownertype, ownername, projectref) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}/branches` }
+ let projectpath = projectref.join('/') + '.proj';
+ return {
+ path: `/${ownertype}/${ownername}/projects/${projectpath}/branches`,
+ };
}
export function projectTagsRunsLink(ownertype, ownername, projectref) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}/tags` }
+ let projectpath = projectref.join('/') + '.proj';
+ return { path: `/${ownertype}/${ownername}/projects/${projectpath}/tags` };
}
export function projectPRsRunsLink(ownertype, ownername, projectref) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}/pullrequests` }
+ let projectpath = projectref.join('/') + '.proj';
+ return {
+ path: `/${ownertype}/${ownername}/projects/${projectpath}/pullrequests`,
+ };
}
export function projectRunLink(ownertype, ownername, projectref, runid) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}/runs/${runid}` }
+ let projectpath = projectref.join('/') + '.proj';
+ return {
+ path: `/${ownertype}/${ownername}/projects/${projectpath}/runs/${runid}`,
+ };
}
-export function projectRunTaskLink(ownertype, ownername, projectref, runid, taskid) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}/runs/${runid}/tasks/${taskid}` }
+export function projectRunTaskLink(
+ ownertype,
+ ownername,
+ projectref,
+ runid,
+ taskid
+) {
+ let projectpath = projectref.join('/') + '.proj';
+ return {
+ path: `/${ownertype}/${ownername}/projects/${projectpath}/runs/${runid}/tasks/${taskid}`,
+ };
}
-export function projectGroupSettingsLink(ownertype, ownername, projectgroupref) {
- let path = projectGroupPath(ownertype, ownername, projectgroupref)
- return { path: `${path}/settings` }
+export function projectGroupSettingsLink(
+ ownertype,
+ ownername,
+ projectgroupref
+) {
+ let path = projectGroupPath(ownertype, ownername, projectgroupref);
+ return { path: `${path}/settings` };
}
export function projectSettingsLink(ownertype, ownername, projectref) {
- let projectpath = (projectref.join("/") + ".proj")
- return { path: `/${ownertype}/${ownername}/projects/${projectpath}/settings` }
+ let projectpath = projectref.join('/') + '.proj';
+ return {
+ path: `/${ownertype}/${ownername}/projects/${projectpath}/settings`,
+ };
}
-export function projectGroupCreateProjectGroupLink(ownertype, ownername, projectgroupref) {
- let path = projectGroupPath(ownertype, ownername, projectgroupref)
- return { path: `${path}/createprojectgroup` }
+export function projectGroupCreateProjectGroupLink(
+ ownertype,
+ ownername,
+ projectgroupref
+) {
+ let path = projectGroupPath(ownertype, ownername, projectgroupref);
+ return { path: `${path}/createprojectgroup` };
}
-export function projectGroupCreateProjectLink(ownertype, ownername, projectgroupref) {
- let path = projectGroupPath(ownertype, ownername, projectgroupref)
- return { path: `${path}/createproject` }
-}
\ No newline at end of file
+export function projectGroupCreateProjectLink(
+ ownertype,
+ ownername,
+ projectgroupref
+) {
+ let path = projectGroupPath(ownertype, ownername, projectgroupref);
+ return { path: `${path}/createproject` };
+}
diff --git a/src/util/run.js b/src/util/run.js
index 79d0c98..b442c0a 100644
--- a/src/util/run.js
+++ b/src/util/run.js
@@ -1,25 +1,24 @@
-
export function runStatus(run) {
- // * if the run has a result then return the result
- // * if stopping return "stopping"
- // * return the phase
- if (run.result != "unknown") return run.result;
- if (run.stopping) return "stopping";
- if (run.phase != "finished") return run.phase;
+ // * if the run has a result then return the result
+ // * if stopping return "stopping"
+ // * return the phase
+ if (run.result != 'unknown') return run.result;
+ if (run.stopping) return 'stopping';
+ if (run.phase != 'finished') return run.phase;
- return run.result;
+ return run.result;
}
export function runResultClass(run) {
- let status = runStatus(run);
+ let status = runStatus(run);
- if (status == "setuperror") return "setuperror";
- if (status == "queued") return "unknown";
- if (status == "cancelled") return "failed";
- if (status == "running") return "running";
- if (status == "stopping") return "failed";
- if (status == "stopped") return "failed";
- if (status == "success") return "success";
- if (status == "failed") return "failed";
- return "unknown";
-}
\ No newline at end of file
+ if (status == 'setuperror') return 'setuperror';
+ if (status == 'queued') return 'unknown';
+ if (status == 'cancelled') return 'failed';
+ if (status == 'running') return 'running';
+ if (status == 'stopping') return 'failed';
+ if (status == 'stopped') return 'failed';
+ if (status == 'success') return 'success';
+ if (status == 'failed') return 'failed';
+ return 'unknown';
+}
diff --git a/src/views/AddLinkedAccount.vue b/src/views/AddLinkedAccount.vue
index 5d2bc22..a45e513 100644
--- a/src/views/AddLinkedAccount.vue
+++ b/src/views/AddLinkedAccount.vue
@@ -13,36 +13,44 @@
v-if="remotesource.auth_type == 'password'"
action="Add Linked Account"
:name="remotesource.name"
- v-on:login="doAddLinkedAccount(remotesource.name, $event.username, $event.password)"
+ v-on:login="
+ doAddLinkedAccount(
+ remotesource.name,
+ $event.username,
+ $event.password
+ )
+ "
/>
Add Linked Account with {{remotesource.name}}
+ >
+ Add Linked Account with {{ remotesource.name }}
+