|
|
@ -14,7 +14,7 @@ |
|
|
|
* See the License for the specific language governing permissions and |
|
|
|
* See the License for the specific language governing permissions and |
|
|
|
* limitations under the License. |
|
|
|
* limitations under the License. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
import { computed } from 'vue' |
|
|
|
import { computed, watch, Ref, ref } from 'vue' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { useCustomParams, useResources } from '.' |
|
|
|
import { useCustomParams, useResources } from '.' |
|
|
|
import type { IJsonItem } from '../types' |
|
|
|
import type { IJsonItem } from '../types' |
|
|
@ -24,13 +24,22 @@ export function useHiveCli(model: { [field: string]: any }): IJsonItem[] { |
|
|
|
const hiveSqlScriptSpan = computed(() => |
|
|
|
const hiveSqlScriptSpan = computed(() => |
|
|
|
model.hiveCliTaskExecutionType === 'SCRIPT' ? 24 : 0 |
|
|
|
model.hiveCliTaskExecutionType === 'SCRIPT' ? 24 : 0 |
|
|
|
) |
|
|
|
) |
|
|
|
const resourcesRequired = computed(() => |
|
|
|
const resourcesRequired = ref( |
|
|
|
model.hiveCliTaskExecutionType === 'SCRIPT' ? false : true |
|
|
|
model.hiveCliTaskExecutionType === 'SCRIPT' ? false : true |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const resourcesLimit = computed(() => |
|
|
|
const resourcesLimit = computed(() => |
|
|
|
model.hiveCliTaskExecutionType === 'SCRIPT' ? -1 : 1 |
|
|
|
model.hiveCliTaskExecutionType === 'SCRIPT' ? -1 : 1 |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
|
|
|
() => model.hiveCliTaskExecutionType, |
|
|
|
|
|
|
|
() => { |
|
|
|
|
|
|
|
resourcesRequired.value = |
|
|
|
|
|
|
|
model.hiveCliTaskExecutionType === 'SCRIPT' ? false : true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
return [ |
|
|
|
return [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: 'select', |
|
|
|
type: 'select', |
|
|
|