feat: team environments (#2512)

Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
Co-authored-by: liyasthomas <liyascthomas@gmail.com>
Co-authored-by: islamzeki <islamzeki@users.noreply.github.com>
Co-authored-by: Jesvin Jose <aitchnyu@users.noreply.github.com>
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
Nivedin
2022-10-07 22:05:39 +05:30
committed by GitHub
parent c35a85db12
commit a568610c28
28 changed files with 1886 additions and 227 deletions

View File

@@ -194,7 +194,7 @@
class="my-4"
/>
</div>
<EnvironmentsDetails
<EnvironmentsMyDetails
:show="showModalDetails"
action="new"
:env-vars="getAdditionVars"
@@ -210,9 +210,9 @@ import { useReadonlyStream, useStream } from "@composables/stream"
import { useI18n } from "@composables/i18n"
import {
globalEnv$,
selectedEnvIndex$,
setCurrentEnvironment,
selectedEnvironmentIndex$,
setGlobalEnvVariables,
setSelectedEnvironmentIndex,
} from "~/newstore/environments"
import { restTestResults$, setRESTTestResults } from "~/newstore/RESTSession"
import { HoppTestResult } from "~/helpers/types/HoppTestResult"
@@ -263,9 +263,9 @@ const haveEnvVariables = computed(() => {
})
const selectedEnvironmentIndex = useStream(
selectedEnvIndex$,
-1,
setCurrentEnvironment
selectedEnvironmentIndex$,
{ type: "NO_ENV_SELECTED" },
setSelectedEnvironmentIndex
)
const globalEnvVars = useReadonlyStream(globalEnv$, []) as Ref<
@@ -275,7 +275,9 @@ const globalEnvVars = useReadonlyStream(globalEnv$, []) as Ref<
}>
>
const noEnvSelected = computed(() => selectedEnvironmentIndex.value === -1)
const noEnvSelected = computed(
() => selectedEnvironmentIndex.value.type === "NO_ENV_SELECTED"
)
const globalHasAdditions = computed(() => {
if (!testResults.value?.envDiff.selected.additions) return false