2020-06-23 00:09:42 +05:30
|
|
|
<script>
|
2023-03-04 22:38:38 +05:30
|
|
|
import { GlLoadingIcon, GlButton, GlAlert } from '@gitlab/ui';
|
|
|
|
import SafeHtml from '~/vue_shared/directives/safe_html';
|
2020-06-23 00:09:42 +05:30
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
GlLoadingIcon,
|
2021-01-29 00:20:46 +05:30
|
|
|
GlButton,
|
|
|
|
GlAlert,
|
|
|
|
},
|
|
|
|
directives: {
|
2023-03-04 22:38:38 +05:30
|
|
|
SafeHtml,
|
2020-06-23 00:09:42 +05:30
|
|
|
},
|
|
|
|
props: {
|
|
|
|
isLoading: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: true,
|
|
|
|
},
|
|
|
|
isValid: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
message: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
helpPath: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
illustrationPath: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onStart() {
|
|
|
|
this.$emit('start');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
2021-01-29 00:20:46 +05:30
|
|
|
<div class="gl-text-center gl-p-5">
|
2020-06-23 00:09:42 +05:30
|
|
|
<div v-if="illustrationPath" class="svg-content svg-130"><img :src="illustrationPath" /></div>
|
|
|
|
<h4>{{ __('Web Terminal') }}</h4>
|
2020-07-28 23:09:34 +05:30
|
|
|
<gl-loading-icon v-if="isLoading" size="lg" class="gl-mt-3" />
|
2020-06-23 00:09:42 +05:30
|
|
|
<template v-else>
|
|
|
|
<p>{{ __('Run tests against your code live using the Web Terminal') }}</p>
|
|
|
|
<p>
|
2021-01-29 00:20:46 +05:30
|
|
|
<gl-button
|
2020-06-23 00:09:42 +05:30
|
|
|
:disabled="!isValid"
|
2021-01-29 00:20:46 +05:30
|
|
|
category="primary"
|
2022-07-23 23:45:48 +05:30
|
|
|
variant="confirm"
|
2020-06-23 00:09:42 +05:30
|
|
|
data-qa-selector="start_web_terminal_button"
|
|
|
|
@click="onStart"
|
|
|
|
>
|
|
|
|
{{ __('Start Web Terminal') }}
|
2021-01-29 00:20:46 +05:30
|
|
|
</gl-button>
|
2020-06-23 00:09:42 +05:30
|
|
|
</p>
|
2021-01-29 00:20:46 +05:30
|
|
|
<gl-alert v-if="!isValid && message" variant="tip" :dismissible="false">
|
|
|
|
<span v-safe-html="message"></span>
|
|
|
|
</gl-alert>
|
2020-06-23 00:09:42 +05:30
|
|
|
<p v-else>
|
|
|
|
<a
|
|
|
|
v-if="helpPath"
|
|
|
|
:href="helpPath"
|
|
|
|
target="_blank"
|
|
|
|
v-text="__('Learn more about Web Terminal')"
|
|
|
|
></a>
|
|
|
|
</p>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</template>
|