Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

refactor: use instance resource in frontend (#13023)

boojack0da15cab846c
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.go
index 78116f7611..de4a56a265 100644
--- a/backend/api/v1/instance_service.go
+++ b/backend/api/v1/instance_service.go
@@ -1080,12 +1080,14 @@ func convertToInstanceResource(instanceMessage *store.InstanceMessage) (*v1pb.In
return nil, err
}
return &v1pb.InstanceResource{
+ Name: instance.Name,
+ State: instance.State,
+ Uid: instance.Uid,
Title: instance.Title,
Engine: instance.Engine,
EngineVersion: instance.EngineVersion,
DataSources: instance.DataSources,
Activation: instance.Activation,
- Name: instance.Name,
Environment: instance.Environment,
}, nil
}
diff --git a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue b/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
index c4fc3c5e70..2a148938c4 100644
--- a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
+++ b/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
@@ -132,7 +132,8 @@ import {
useCurrentUserV1,
useDatabaseV1Store,
useEnvironmentV1List,
- useInstanceV1List,
+ useEnvironmentV1Store,
+ useInstanceResourceList,
} from "@/store";
import type { ComposedProject } from "@/types";
import type { Anomaly } from "@/types/proto/v1/anomaly_service";
@@ -164,26 +165,23 @@ const props = defineProps<{
selectedTab?: AnomalyTabId;
}>();
-const databaseStore = useDatabaseV1Store();
const { t } = useI18n();
-
+const databaseStore = useDatabaseV1Store();
+const environmentStore = useEnvironmentV1Store();
const currentUserV1 = useCurrentUserV1();
+const allAnomalyList = useAnomalyV1List();
+const instanceList = useInstanceResourceList();
+const environmentList = useEnvironmentV1List(false /* !showDeleted */);
const state = reactive<LocalState>({
selectedTab: props.selectedTab ?? "database",
searchText: "",
});
-const environmentList = useEnvironmentV1List(false /* !showDeleted */);
-
const databaseList = computed(() => {
return databaseStore.databaseListByUser(currentUserV1.value);
});
-const { instanceList } = useInstanceV1List();
-
-const allAnomalyList = useAnomalyV1List();
-
const databaseListByProject = computed(() => {
return databaseList.value.filter((db) => {
if (!props.project) {
@@ -247,8 +245,9 @@ const instanceAnomalySectionList = computed(
instance.title
.toLowerCase()
.includes(state.searchText.toLowerCase()) ||
- instance.environmentEntity.title
- .toLowerCase()
+ environmentStore
+ .getEnvironmentByName(instance.environment)
+ .title.toLowerCase()
.includes(state.searchText.toLowerCase())
) {
return true;
@@ -263,7 +262,9 @@ const instanceAnomalySectionList = computed(
);
if (anomalyListOfInstance.length > 0) {
sectionList.push({
- title: `${instance.title} (${instance.environmentEntity.title})`,
+ title: `${instance.title} (${
+ environmentStore.getEnvironmentByName(instance.environment).title
+ })`,
link: `/${instance.name}`,
list: anomalyListOfInstance,
});
@@ -351,7 +352,9 @@ const instanceAnomalySummaryList = computed((): Summary[] => {
summary.mediumCount += mediumCount;
} else {
envMap.set(instance.environment, {
- environmentName: instance.environmentEntity.title,
+ environmentName: environmentStore.getEnvironmentByName(
+ instance.environment
+ ).title,
criticalCount,
highCount,
mediumCount,
diff --git a/frontend/src/components/ChangeHistory/ChangeHistoryDetail.vue b/frontend/src/components/ChangeHistory/ChangeHistoryDetail.vue
index aa7cb28a66..b1c21fc035 100644
--- a/frontend/src/components/ChangeHistory/ChangeHistoryDetail.vue
+++ b/frontend/src/components/ChangeHistory/ChangeHistoryDetail.vue
@@ -295,7 +295,6 @@ import {
useDatabaseV1Store,
useUserStore,
useCurrentUserV1,
- useInstanceV1Store,
useSettingV1Store,
} from "@/store";
import type { AffectedTable } from "@/types/changeHistory";
@@ -339,15 +338,10 @@ const state = reactive<LocalState>({
const databaseStore = useDatabaseV1Store();
const dbSchemaStore = useDBSchemaV1Store();
-const instanceStore = useInstanceV1Store();
const settingStore = useSettingV1Store();
const changeHistoryStore = useChangeHistoryStore();
const selectedAffectedTable = ref<AffectedTable | undefined>();
-const v1Instance = computed(() => {
- return instanceStore.getInstanceByName(props.instance);
-});
-
// eslint-disable-next-line vue/no-dupe-keys
const database = computed(() => {
return databaseStore.getDatabaseByName(changeHistoryParent.value);
@@ -383,7 +377,7 @@ const affectedTables = computed(() => {
});
const showSchemaSnapshot = computed(() => {
- return v1Instance.value.engine !== Engine.RISINGWAVE;
+ return database.value.instanceResource.engine !== Engine.RISINGWAVE;
});
watch(
diff --git a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue
index a4c8ea556e..c61684366b 100644
--- a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue
+++ b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue
@@ -63,10 +63,6 @@
<div class="w-full">
<div class="flex flex-row items-center space-x-1">
- <InstanceV1EngineIcon
- v-if="state.instanceName"
- :instance="selectedInstance"
- />
<label for="instance" class="textlabel">
{{ $t("common.instance") }} <span class="text-red-600">*</span>
</label>
@@ -172,15 +168,14 @@ import {
ProjectSelect,
EnvironmentSelect,
InstanceSelect,
- InstanceV1EngineIcon,
} from "@/components/v2";
import {
experimentalCreateIssueByPlan,
useCurrentUserV1,
+ useInstanceResourceByName,
useInstanceV1Store,
useProjectV1Store,
} from "@/store";
-import type { ComposedInstance } from "@/types";
import {
defaultCharsetOfEngineV1,
defaultCollationOfEngineV1,
@@ -277,9 +272,9 @@ const allowEditInstance = computed(() => {
return !props.instanceName;
});
-const selectedInstance = computed((): ComposedInstance => {
- return instanceV1Store.getInstanceByName(state.instanceName ?? "");
-});
+const selectedInstance = computed(() =>
+ useInstanceResourceByName(state.instanceName ?? "")
+);
const showCollationAndCharacterSet = computed((): boolean => {
const instance = selectedInstance.value;
diff --git a/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue b/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue
index b6738dce1a..60e6032c0e 100644
--- a/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue
+++ b/frontend/src/components/FeatureGuard/FeatureAttentionForInstanceLicense.vue
@@ -30,7 +30,7 @@ import { BBAttention } from "@/bbkit";
import {
useSubscriptionV1Store,
useCurrentUserV1,
- useInstanceV1List,
+ useInstanceResourceList,
} from "@/store";
import type { FeatureType } from "@/types";
import { instanceLimitFeature } from "@/types";
@@ -55,7 +55,7 @@ const state = reactive<LocalState>({
const subscriptionV1Store = useSubscriptionV1Store();
const featureKey = props.feature.split(".").join("-");
const currentUserV1 = useCurrentUserV1();
-const { instanceList } = useInstanceV1List(false /* !showDeleted */);
+const instanceList = useInstanceResourceList();
const onClick = () => {
state.showInstanceAssignmentDrawer = true;
diff --git a/frontend/src/components/InstanceAssignment.vue b/frontend/src/components/InstanceAssignment.vue
index 899efe513f..3228d2270d 100644
--- a/frontend/src/components/InstanceAssignment.vue
+++ b/frontend/src/components/InstanceAssignment.vue
@@ -136,12 +136,16 @@ import { Drawer, DrawerContent } from "@/components/v2";
import {
pushNotification,
useInstanceV1Store,
- useInstanceV1List,
useSubscriptionV1Store,
useDatabaseV1Store,
useCurrentUserV1,
+ useInstanceResourceList,
} from "@/store";
import type { ComposedInstance } from "@/types";
+import {
+ Instance,
+ type InstanceResource,
+} from "@/types/proto/v1/instance_service";
import {
instanceV1Name,
hostPortOfInstanceV1,
@@ -177,7 +181,7 @@ const subscriptionStore = useSubscriptionV1Store();
const { t } = useI18n();
const currentUserV1 = useCurrentUserV1();
-const { instanceList } = useInstanceV1List(false /* !showDeleted */);
+const instanceList = useInstanceResourceList();
const { instanceLicenseCount } = storeToRefs(subscriptionStore);
const columnList = computed(() => {
@@ -254,7 +258,7 @@ const allSelectionState = computed(() => {
});
const toggleSelectInstance = (
- instance: ComposedInstance,
+ instance: InstanceResource,
selected: boolean
) => {
if (selected) {
@@ -298,8 +302,11 @@ const updateAssignment = async () => {
if (instance.activation && !selectedInstanceName.has(instance.name)) {
// deactivate instance
instance.activation = false;
- await instanceV1Store.updateInstance(instance, ["activation"]);
- databaseV1Store.updateDatabaseInstance(instance);
+ const composedInstance = await instanceV1Store.updateInstance(
+ Instance.fromPartial(instance),
+ ["activation"]
+ );
+ databaseV1Store.updateDatabaseInstance(composedInstance);
}
if (instance.activation && selectedInstanceName.has(instance.name)) {
// remove unchanged
@@ -314,8 +321,11 @@ const updateAssignment = async () => {
}
// activate instance
instance.activation = true;
- await instanceV1Store.updateInstance(instance, ["activation"]);
- databaseV1Store.updateDatabaseInstance(instance);
+ const composedInstance = await instanceV1Store.updateInstance(
+ Instance.fromPartial(instance),
+ ["activation"]
+ );
+ databaseV1Store.updateDatabaseInstance(composedInstance);
}
pushNotification({
diff --git a/frontend/src/components/InstanceRoleSelect.vue b/frontend/src/components/InstanceRoleSelect.vue
index 5994133d43..9eab614ddb 100644
--- a/frontend/src/components/InstanceRoleSelect.vue
+++ b/frontend/src/components/InstanceRoleSelect.vue
@@ -40,9 +40,8 @@ watch(
() => props.instanceName,
async (instanceName) => {
if (instanceName) {
- const instance = instanceV1Store.getInstanceByName(instanceName);
instanceRoleList.value =
- await instanceV1Store.fetchInstanceRoleListByName(instance.name);
+ await instanceV1Store.fetchInstanceRoleListByName(instanceName);
emit("update:instance-role", undefined);
}
},
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vue
index 48ded7ad38..52f2816467 100644
--- a/frontend/src/components/IssueV1/IssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue
@@ -75,7 +75,7 @@
<script setup lang="ts">
import { ref } from "vue";
-import type { Task } from "@/types/proto/v1/rollout_service";
+import { type Task } from "@/types/proto/v1/rollout_service";
import type { Advice } from "@/types/proto/v1/sql_service";
import { provideSQLCheckContext } from "../SQLCheck";
import { Drawer } from "../v2";
diff --git a/frontend/src/components/IssueV1/logic/plan.ts b/frontend/src/components/IssueV1/logic/plan.ts
index 417a70430a..f2f74de0a6 100644
--- a/frontend/src/components/IssueV1/logic/plan.ts
+++ b/frontend/src/components/IssueV1/logic/plan.ts
@@ -4,7 +4,7 @@ import {
useDatabaseV1Store,
useDBGroupStore,
useEnvironmentV1Store,
- useInstanceV1Store,
+ useInstanceResourceByName,
} from "@/store";
import {
type ComposedProject,
@@ -22,11 +22,12 @@ export const databaseForSpec = (
issue: ComposedIssue,
spec: Plan_Spec
): ComposedDatabase => {
+ const environmentStore = useEnvironmentV1Store();
const { createDatabaseConfig, changeDatabaseConfig, exportDataConfig } = spec;
if (createDatabaseConfig !== undefined) {
const instanceName = createDatabaseConfig.target;
const databaseName = createDatabaseConfig.database;
- const instance = useInstanceV1Store().getInstanceByName(instanceName);
+ const instance = useInstanceResourceByName(instanceName);
return {
...unknownDatabase(),
name: `${instanceName}/databases/${databaseName}`,
@@ -36,7 +37,9 @@ export const databaseForSpec = (
project: issue.project,
projectEntity: issue.projectEntity,
effectiveEnvironment: instance.environment,
- effectiveEnvironmentEntity: instance.environmentEntity,
+ effectiveEnvironmentEntity: environmentStore.getEnvironmentByName(
+ instance.environment
+ ),
instanceResource: instance,
};
} else if (
diff --git a/frontend/src/components/IssueV1/logic/utils.ts b/frontend/src/components/IssueV1/logic/utils.ts
index e2a073a635..cf5262e9b2 100644
--- a/frontend/src/components/IssueV1/logic/utils.ts
+++ b/frontend/src/components/IssueV1/logic/utils.ts
@@ -6,7 +6,7 @@ import {
pushNotification,
useDatabaseV1Store,
useEnvironmentV1Store,
- useInstanceV1Store,
+ useInstanceResourceByName,
} from "@/store";
import type { ComposedDatabase, ComposedIssue, ComposedProject } from "@/types";
import { unknownDatabase, UNKNOWN_ID, unknownEnvironment } from "@/types";
@@ -78,7 +78,8 @@ const extractCoreDatabaseInfoFromDatabaseCreateTask = (
return maybeExistedDatabase;
}
- const instance = useInstanceV1Store().getInstanceByName(instanceName);
+ const environmentStore = useEnvironmentV1Store();
+ const instance = useInstanceResourceByName(instanceName);
return {
...unknownDatabase(),
name,
@@ -88,7 +89,9 @@ const extractCoreDatabaseInfoFromDatabaseCreateTask = (
project: project.name,
projectEntity: project,
effectiveEnvironment: instance.environment,
- effectiveEnvironmentEntity: instance.environmentEntity,
+ effectiveEnvironmentEntity: environmentStore.getEnvironmentByName(
+ instance.environment
+ ),
instanceResource: instance,
};
};
diff --git a/frontend/src/components/ProvideDashboardContext.vue b/frontend/src/components/ProvideDashboardContext.vue
index ba85af4612..82008377c4 100644
--- a/frontend/src/components/ProvideDashboardContext.vue
+++ b/frontend/src/components/ProvideDashboardContext.vue
@@ -23,7 +23,6 @@ import {
} from "@/router/auth";
import {
useEnvironmentV1Store,
- useInstanceV1Store,
usePolicyV1Store,
useProjectV1Store,
useRoleStore,
@@ -45,14 +44,6 @@ const isSwitchingProject = ref(false);
const policyStore = usePolicyV1Store();
const databaseStore = useDatabaseV1Store();
-const fetchInstances = async (optionalProject: string) => {
- const parent = optionalProject ? `${projectNamePrefix}${optionalProject}` : undefined;
- await useInstanceV1Store().fetchInstanceList(
- /* !showDeleted */ false,
- parent
- );
-};
-
const fetchDatabases = async (optionalProject: string) => {
const filters = [`instance = "instances/-"`];
// If `projectId` is provided in the route, filter the database list by the project.
@@ -64,12 +55,12 @@ const fetchDatabases = async (optionalProject: string) => {
});
};
-const instanceAndDatabaseInitialized = new Set<string /* project */>();
+const databaseInitialized = new Set<string /* project */>();
const fetchInstancesAndDatabases = async (optionalProject: string) => {
- if (instanceAndDatabaseInitialized.has(optionalProject || "")) return;
+ if (databaseInitialized.has(optionalProject || "")) return;
try {
- await Promise.all([fetchInstances(optionalProject), fetchDatabases(optionalProject)]);
- instanceAndDatabaseInitialized.add(optionalProject || "");
+ await Promise.all([fetchDatabases(optionalProject)]);
+ databaseInitialized.add(optionalProject || "");
} catch {
// nothing
}
@@ -107,7 +98,7 @@ onMounted(async () => {
to.name === AUTH_MFA_MODULE ||
to.name === AUTH_PASSWORD_FORGOT_MODULE
) {
- instanceAndDatabaseInitialized.clear();
+ databaseInitialized.clear();
next();
return;
}
diff --git a/frontend/src/components/ProvideSQLEditorContext.vue b/frontend/src/components/ProvideSQLEditorContext.vue
index db9f0cd88e..a9995ed283 100644
--- a/frontend/src/components/ProvideSQLEditorContext.vue
+++ b/frontend/src/components/ProvideSQLEditorContext.vue
@@ -85,7 +85,6 @@ const router = useRouter();
const me = useCurrentUserV1();
const projectStore = useProjectV1Store();
const databaseStore = useDatabaseV1Store();
-const instanceStore = useInstanceV1Store();
const editorStore = useSQLEditorStore();
const worksheetStore = useWorkSheetStore();
const tabStore = useSQLEditorTabStore();
@@ -157,18 +156,6 @@ const handleProjectSwitched = async () => {
tabStore.maybeInitProject(project);
};
-const prepareInstances = async () => {
- const { project } = editorStore;
- if (project) {
- await instanceStore.fetchProjectInstanceList(
- extractProjectResourceName(project)
- );
- } else {
- // TODO(d): do we still have non-project cases?
- await instanceStore.listInstances();
- }
-};
-
const prepareDatabases = async () => {
// It will also be called when user logout
if (me.value.name === UNKNOWN_USER_NAME) {
@@ -176,17 +163,13 @@ const prepareDatabases = async () => {
}
const { project } = editorStore;
// `databaseList` is the database list in the project.
- const databaseList = (
- await databaseStore.listDatabases(project)
- ).filter((db) => db.syncState === State.ACTIVE);
+ const databaseList = (await databaseStore.listDatabases(project)).filter(
+ (db) => db.syncState === State.ACTIVE
+ );
editorStore.databaseList = databaseList;
};
-const prepareInstancesAndDatabases = async () => {
- await Promise.all([prepareInstances(), prepareDatabases()]);
-};
-
const connect = (connection: SQLEditorConnection) => {
tabStore.selectOrAddSimilarNewTab(
{
@@ -544,8 +527,7 @@ const syncURLWithConnection = () => {
}
}
if (instanceName) {
- const instance = instanceStore.getInstanceByName(instanceName);
- if (isValidInstanceName(instance.name)) {
+ if (isValidInstanceName(instanceName)) {
if (table) {
query.table = table;
query.schema = schema ?? "";
@@ -554,7 +536,7 @@ const syncURLWithConnection = () => {
name: SQL_EDITOR_INSTANCE_MODULE,
params: {
project: extractProjectResourceName(editorStore.project),
- instance: extractInstanceResourceName(instance.name),
+ instance: extractInstanceResourceName(instanceName),
},
query,
});
@@ -603,7 +585,7 @@ onMounted(async () => {
initializeProjects(),
groupStore.fetchGroupList(),
]);
- await prepareInstancesAndDatabases();
+ await prepareDatabases();
tabStore.maybeInitProject(editorStore.project);
editorStore.projectContextReady = true;
nextTick(() => {
@@ -618,7 +600,7 @@ onMounted(async () => {
async () => {
editorStore.projectContextReady = false;
await handleProjectSwitched();
- await prepareInstancesAndDatabases();
+ await prepareDatabases();
tabStore.maybeInitProject(editorStore.project);
editorStore.projectContextReady = true;
nextTick(() => {
diff --git a/frontend/src/components/QuickActionPanel.vue b/frontend/src/components/QuickActionPanel.vue
index 6efae3c9ce..40ef123025 100644
--- a/frontend/src/components/QuickActionPanel.vue
+++ b/frontend/src/components/QuickActionPanel.vue
@@ -130,12 +130,12 @@ import { Drawer, DrawerContent } from "@/components/v2";
import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/router/dashboard/projectV1";
import { PROJECT_V1_ROUTE_DASHBOARD } from "@/router/dashboard/workspaceRoutes";
import {
- useInstanceV1Store,
useCommandStore,
useCurrentUserIamPolicy,
useSubscriptionV1Store,
useProjectV1Store,
useProjectV1List,
+ useInstanceResourceList,
} from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
import type {
@@ -229,8 +229,8 @@ const transferDatabase = () => {
};
const createInstance = () => {
- const instanceList = useInstanceV1Store().activeInstanceList;
- if (subscriptionStore.instanceCountLimit <= instanceList.length) {
+ const instanceList = useInstanceResourceList();
+ if (subscriptionStore.instanceCountLimit <= instanceList.value.length) {
state.feature = "bb.feature.instance-count";
return;
}
diff --git a/frontend/src/components/SensitiveData/components/utils.ts b/frontend/src/components/SensitiveData/components/utils.ts
index 33fe8f7358..7312c2f52c 100644
--- a/frontend/src/components/SensitiveData/components/utils.ts
+++ b/frontend/src/components/SensitiveData/components/utils.ts
@@ -3,8 +3,8 @@ import type { SelectOption } from "naive-ui";
import type { Factor, Operator } from "@/plugins/cel";
import { EqualityOperatorList, CollectionOperatorList } from "@/plugins/cel";
import {
+ useInstanceResourceList,
useEnvironmentV1Store,
- useInstanceV1List,
useProjectV1List,
useSettingV1Store,
} from "@/store";
@@ -47,7 +47,7 @@ export const getEnvironmentIdOptions = () => {
};
export const getInstanceIdOptions = () => {
- const { instanceList } = useInstanceV1List(false);
+ const instanceList = useInstanceResourceList();
return instanceList.value.map<SelectOption>((ins) => {
const instanceId = extractInstanceResourceName(ins.name);
return {
@@ -81,7 +81,11 @@ export const factorOperatorOverrideMap = new Map<Factor, Operator[]>([
["project_id", uniq([...EqualityOperatorList, ...CollectionOperatorList])],
]);
-export type MaskingType = "full-mask" | "range-mask" | "md5-mask" | "inner-outer-mask";
+export type MaskingType =
+ | "full-mask"
+ | "range-mask"
+ | "md5-mask"
+ | "inner-outer-mask";
export const getMaskingType = (
algorithm: MaskingAlgorithmSetting_Algorithm
@@ -95,7 +99,7 @@ export const getMaskingType = (
} else if (algorithm.rangeMask) {
return "range-mask";
} else if (algorithm.innerOuterMask) {
- return "inner-outer-mask"
+ return "inner-outer-mask";
}
break;
default:
diff --git a/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue b/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue
index b286ffd4d3..66ff48bbf0 100644
--- a/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue
+++ b/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue
@@ -59,6 +59,7 @@ import {
isValidInstanceName,
isValidProjectName,
} from "@/types";
+import type { InstanceResource } from "@/types/proto/v1/instance_service";
import type { Project } from "@/types/proto/v1/project_service";
import type { TransferSource } from "./utils";
@@ -110,7 +111,7 @@ const changeInstanceFilter = (name: string | undefined) => {
emit("select-instance", useInstanceV1Store().getInstanceByName(name));
};
-const filterInstance = (instance: ComposedInstance) => {
+const filterInstance = (instance: InstanceResource) => {
if (instance.name === UNKNOWN_INSTANCE_NAME) return true; // "ALL" can be displayed.
return nonEmptyInstanceNameSet.value.has(instance.name);
};
diff --git a/frontend/src/components/v2/Select/InstanceSelect.vue b/frontend/src/components/v2/Select/InstanceSelect.vue
index 3bdd6404da..9b710d7be7 100644
--- a/frontend/src/components/v2/Select/InstanceSelect.vue
+++ b/frontend/src/components/v2/Select/InstanceSelect.vue
@@ -20,21 +20,22 @@ import type { SelectOption } from "naive-ui";
import { NSelect } from "naive-ui";
import { computed, watch, h } from "vue";
import { useI18n } from "vue-i18n";
-import { useInstanceV1List } from "@/store";
-import type { ComposedInstance } from "@/types";
+import { useInstanceResourceList } from "@/store";
import {
UNKNOWN_INSTANCE_NAME,
isValidEnvironmentName,
unknownInstance,
+ type ComposedInstance,
} from "@/types";
import type { Engine } from "@/types/proto/v1/common";
import { State } from "@/types/proto/v1/common";
+import type { InstanceResource } from "@/types/proto/v1/instance_service";
import { supportedEngineV1List } from "@/utils";
import { InstanceV1EngineIcon } from "../Model/Instance";
interface InstanceSelectOption extends SelectOption {
value: string;
- instance: ComposedInstance;
+ instance: ComposedInstance | InstanceResource;
}
const props = withDefaults(
@@ -45,7 +46,10 @@ const props = withDefaults(
includeAll?: boolean;
includeArchived?: boolean;
autoReset?: boolean;
- filter?: (instance: ComposedInstance, index: number) => boolean;
+ filter?: (
+ instance: ComposedInstance | InstanceResource,
+ index: number
+ ) => boolean;
}>(),
{
instanceName: undefined,
@@ -63,14 +67,12 @@ const emit = defineEmits<{
}>();
const { t } = useI18n();
-const { instanceList: allInstanceList, ready } = useInstanceV1List(
- true /* showDeleted */
-);
+const instanceList = useInstanceResourceList();
const rawInstanceList = computed(() => {
- let list = [...allInstanceList.value];
+ let list = [...instanceList.value];
if (isValidEnvironmentName(props.environmentName)) {
- list = allInstanceList.value.filter(
+ list = instanceList.value.filter(
(instance) => instance.environment === props.environmentName
);
}
@@ -145,7 +147,6 @@ const filterByTitle = (pattern: string, option: SelectOption) => {
const resetInvalidSelection = () => {
if (!props.autoReset) return;
if (
- ready.value &&
props.instanceName &&
!combinedInstanceList.value.find((item) => item.name === props.instanceName)
) {
diff --git a/frontend/src/layouts/InstanceLayout.vue b/frontend/src/layouts/InstanceLayout.vue
index 6dec51d241..deefdc9e9a 100644
--- a/frontend/src/layouts/InstanceLayout.vue
+++ b/frontend/src/layouts/InstanceLayout.vue
@@ -22,7 +22,7 @@
</template>
<script lang="ts" setup>
-import { computed } from "vue";
+import { computed, onMounted } from "vue";
import { useRouter } from "vue-router";
import { BBSpin } from "@/bbkit";
import ProvideInstanceContext from "@/components/ProvideInstanceContext.vue";
@@ -52,6 +52,12 @@ const hasPermission = computed(() => {
);
});
+onMounted(() => {
+ instanceStore.getOrFetchInstanceByName(
+ `${instanceNamePrefix}${props.instanceId}`
+ );
+});
+
const instance = computed(() =>
instanceStore.getInstanceByName(`${instanceNamePrefix}${props.instanceId}`)
);
diff --git a/frontend/src/router/dashboard/workspace.ts b/frontend/src/router/dashboard/workspace.ts
index b7334876fa..5cfd397d10 100644
--- a/frontend/src/router/dashboard/workspace.ts
+++ b/frontend/src/router/dashboard/workspace.ts
@@ -90,6 +90,7 @@ const workspaceRoutes: RouteRecordRaw[] = [
getQuickActionList: () => {
return ["quickaction.bb.instance.create"];
},
+ requiredWorkspacePermissionList: () => ["bb.instances.list"],
},
components: {
content: () => import("@/views/InstanceDashboard.vue"),
@@ -160,12 +161,6 @@ const workspaceRoutes: RouteRecordRaw[] = [
},
},
{
- // "u" stands for user. Strictly speaking, it's not accurate because we
- // may refer to other principal type in the future. But from the endusers'
- // perspective, they are more familiar with the "user" concept.
- // We make an exception to use a shorthand here because it's a commonly
- // accessed endpoint, and maybe in the future, we will further provide a
- // shortlink such as users/<<email>>
path: "users/:principalEmail",
name: WORKSPACE_ROUTE_USER_PROFILE,
components: {
diff --git a/frontend/src/store/modules/sqlEditor/tab.ts b/frontend/src/store/modules/sqlEditor/tab.ts
index e6c47e1ca4..3dbd3c9fcc 100644
--- a/frontend/src/store/modules/sqlEditor/tab.ts
+++ b/frontend/src/store/modules/sqlEditor/tab.ts
@@ -20,7 +20,11 @@ import {
useDynamicLocalStorage,
} from "@/utils";
import { useCurrentUserV1 } from "../auth";
-import { useDatabaseV1Store, useInstanceV1Store } from "../v1";
+import {
+ useDatabaseV1Store,
+ useEnvironmentV1Store,
+ useInstanceResourceByName,
+} from "../v1";
import { useSQLEditorStore } from "./editor";
import { useWebTerminalStore } from "./webTerminal";
@@ -83,7 +87,9 @@ export const useSQLEditorTabStore = defineStore("sqlEditorTab", () => {
Record<string, string[]>
>(tabIdListKey, {});
- const currentTabIdKey = computed(() => `${keyNamespace.value}.current-tab-id`);
+ const currentTabIdKey = computed(
+ () => `${keyNamespace.value}.current-tab-id`
+ );
const currentTabIdMapByProject = useDynamicLocalStorage<
Record<string, string | undefined>
>(currentTabIdKey, {});
@@ -346,7 +352,7 @@ export const useSQLEditorConnectionDetail = (
connection: MaybeRef<SQLEditorConnection>
) => {
const instance = computed(() => {
- return useInstanceV1Store().getInstanceByName(unref(connection).instance);
+ return useInstanceResourceByName(unref(connection).instance);
});
const database = computed(() => {
@@ -358,7 +364,9 @@ export const useSQLEditorConnectionDetail = (
return database.value.effectiveEnvironmentEntity;
}
- return instance.value.environmentEntity;
+ return useEnvironmentV1Store().getEnvironmentByName(
+ instance.value.environment
+ );
});
return { connection, instance, database, environment };
diff --git a/frontend/src/store/modules/sqlEditor/tree.ts b/frontend/src/store/modules/sqlEditor/tree.ts
index 8c4529cd69..c37dd6925c 100644
--- a/frontend/src/store/modules/sqlEditor/tree.ts
+++ b/frontend/src/store/modules/sqlEditor/tree.ts
@@ -5,7 +5,6 @@ import { computed, reactive, ref, watch } from "vue";
import { useCurrentUserV1 } from "@/store";
import type {
ComposedDatabase,
- ComposedInstance,
ComposedProject,
SQLEditorTreeFactor as Factor,
SQLEditorTreeNode as TreeNode,
@@ -21,9 +20,10 @@ import {
LeafTreeNodeTypes,
} from "@/types";
import type { Environment } from "@/types/proto/v1/environment_service";
+import type { InstanceResource } from "@/types/proto/v1/instance_service";
import { getSemanticLabelValue, groupBy, isDatabaseV1Queryable } from "@/utils";
import { useFilterStore } from "../filter";
-import { useEnvironmentV1Store, useInstanceV1Store } from "../v1";
+import { useEnvironmentV1Store, useInstanceResourceByName } from "../v1";
import { useSQLEditorStore } from "./editor";
export const ROOT_NODE_ID = "ROOT";
@@ -242,7 +242,7 @@ export const idForSQLEditorTreeNodeTarget = <T extends NodeType>(
return (
target as
| ComposedProject
- | ComposedInstance
+ | InstanceResource
| Environment
| ComposedDatabase
).name;
@@ -339,7 +339,7 @@ const mapGroupNode = (
return mapTreeNodeByType("environment", environment, parent);
}
if (factor === "instance") {
- const instance = useInstanceV1Store().getInstanceByName(value);
+ const instance = useInstanceResourceByName(value);
return mapTreeNodeByType("instance", instance, parent);
}
// factor is label
@@ -389,7 +389,7 @@ const readableTargetByType = <T extends NodeType>(
return (target as Environment).title;
}
if (type === "instance") {
- return (target as ComposedInstance).title;
+ return (target as InstanceResource).title;
}
if (type === "database") {
return (target as ComposedDatabase).databaseName;
diff --git a/frontend/src/store/modules/v1/index.ts b/frontend/src/store/modules/v1/index.ts
index 1acade96e8..aefda3c72d 100644
--- a/frontend/src/store/modules/v1/index.ts
+++ b/frontend/src/store/modules/v1/index.ts
@@ -27,3 +27,4 @@ export * from "./auditLog";
export * from "./userGroup";
export * from "./permission";
export * from "./workspace";
+export * from "./instanceResource";
diff --git a/frontend/src/store/modules/v1/instance.ts b/frontend/src/store/modules/v1/instance.ts
index 54b3d63e69..17969f43db 100644
--- a/frontend/src/store/modules/v1/instance.ts
+++ b/frontend/src/store/modules/v1/instance.ts
@@ -1,19 +1,16 @@
import { defineStore } from "pinia";
import { computed, reactive, ref, unref, watchEffect } from "vue";
import { instanceRoleServiceClient, instanceServiceClient } from "@/grpcweb";
-import { useCurrentUserV1 } from "@/store";
-import { projectNamePrefix } from "@/store/modules/v1/common";
import type { ComposedInstance, MaybeRef } from "@/types";
import { unknownEnvironment, unknownInstance } from "@/types";
import { State } from "@/types/proto/v1/common";
import type { InstanceRole } from "@/types/proto/v1/instance_role_service";
import type { DataSource, Instance } from "@/types/proto/v1/instance_service";
-import { extractInstanceResourceName, hasWorkspacePermissionV2 } from "@/utils";
+import { extractInstanceResourceName } from "@/utils";
import { extractGrpcErrorMessage } from "@/utils/grpcweb";
import { useEnvironmentV1Store } from "./environment";
export const useInstanceV1Store = defineStore("instance_v1", () => {
- const currentUser = useCurrentUserV1();
const instanceMapByName = reactive(new Map<string, ComposedInstance>());
const instanceRoleListMapByName = reactive(new Map<string, InstanceRole[]>());
@@ -52,26 +49,10 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {
});
return composedInstances;
};
- const listInstances = async (showDeleted = false) => {
- const { instances } = await instanceServiceClient.listInstances({ showDeleted });
- const composed = await upsertInstances(instances);
- return composed;
- };
- // Deprecated.
- const fetchInstanceList = async (showDeleted = false, parent?: string) => {
- const request = hasWorkspacePermissionV2(
- currentUser.value,
- "bb.instances.list"
- )
- ? instanceServiceClient.listInstances
- : instanceServiceClient.searchInstances;
- const { instances } = await request({ showDeleted, parent });
- const composed = await upsertInstances(instances);
- return composed;
- };
- const fetchProjectInstanceList = async (project: string) => {
- const { instances } = await instanceServiceClient.searchInstances({
- parent: `${projectNamePrefix}${project}`,
+ const listInstances = async (showDeleted = false, parent?: string) => {
+ const { instances } = await instanceServiceClient.listInstances({
+ showDeleted,
+ parent,
});
const composed = await upsertInstances(instances);
return composed;
@@ -212,8 +193,6 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {
syncInstance,
batchSyncInstances,
listInstances,
- fetchInstanceList,
- fetchProjectInstanceList,
getInstanceByName,
getOrFetchInstanceByName,
fetchInstanceRoleByName,
@@ -239,7 +218,7 @@ export const useInstanceV1List = (
}
ready.value = false;
- store.fetchInstanceList(unref(showDeleted), unref(parent)).then(() => {
+ store.listInstances(unref(showDeleted), unref(parent)).then(() => {
ready.value = true;
});
});
diff --git a/frontend/src/store/modules/v1/instanceResource.ts b/frontend/src/store/modules/v1/instanceResource.ts
new file mode 100644
index 0000000000..ab2375228e
--- /dev/null
+++ b/frontend/src/store/modules/v1/instanceResource.ts
@@ -0,0 +1,27 @@
+import { uniqBy } from "lodash-es";
+import { computed } from "vue";
+import { unknownInstanceResource } from "@/types";
+import { useDatabaseV1Store } from "./database";
+
+// Instance resource list is a list of all instance resources in the database list.
+// Current user should have access to all instance resources in the list.
+export const useInstanceResourceList = () => {
+ const databaseStore = useDatabaseV1Store();
+ return computed(() => {
+ return uniqBy(
+ databaseStore.databaseList.map((db) => db.instanceResource),
+ (i) => i.name
+ );
+ });
+};
+
+// Instance resource list is a list of all instance resources in the database list.
+// Current user should have access to all instance resources in the list.
+export const useInstanceResourceByName = (
+ instanceName: string // Format: instances/{instance}
+) => {
+ return (
+ useInstanceResourceList().value.find((i) => i.name === instanceName) ||
+ unknownInstanceResource()
+ );
+};
diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.ts
index fd9a16e0ca..bff5552a05 100644
--- a/frontend/src/types/proto/v1/instance_service.ts
+++ b/frontend/src/types/proto/v1/instance_service.ts
@@ -710,6 +710,8 @@ export interface InstanceResource {
* Format: environments/prod where prod is the environment resource ID.
*/
environment: string;
+ state: State;
+ uid: string;
}
export interface SASLConfig {
@@ -3211,6 +3213,8 @@ function createBaseInstanceResource(): InstanceResource {
activation: false,
name: "",
environment: "",
+ state: State.STATE_UNSPECIFIED,
+ uid: "",
};
}
@@ -3237,6 +3241,12 @@ export const InstanceResource = {
if (message.environment !== "") {
writer.uint32(58).string(message.environment);
}
+ if (message.state !== State.STATE_UNSPECIFIED) {
+ writer.uint32(64).int32(stateToNumber(message.state));
+ }
+ if (message.uid !== "") {
+ writer.uint32(74).string(message.uid);
+ }
return writer;
},
@@ -3296,6 +3306,20 @@ export const InstanceResource = {
message.environment = reader.string();
continue;
+ case 8:
+ if (tag !== 64) {
+ break;
+ }
+
+ message.state = stateFromJSON(reader.int32());
+ continue;
+ case 9:
+ if (tag !== 74) {
+ break;
+ }
+
+ message.uid = reader.string();
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -3316,6 +3340,8 @@ export const InstanceResource = {
activation: isSet(object.activation) ? globalThis.Boolean(object.activation) : false,
name: isSet(object.name) ? globalThis.String(object.name) : "",
environment: isSet(object.environment) ? globalThis.String(object.environment) : "",
+ state: isSet(object.state) ? stateFromJSON(object.state) : State.STATE_UNSPECIFIED,
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
};
},
@@ -3342,6 +3368,12 @@ export const InstanceResource = {
if (message.environment !== "") {
obj.environment = message.environment;
}
+ if (message.state !== State.STATE_UNSPECIFIED) {
+ obj.state = stateToJSON(message.state);
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
return obj;
},
@@ -3357,6 +3389,8 @@ export const InstanceResource = {
message.activation = object.activation ?? false;
message.name = object.name ?? "";
message.environment = object.environment ?? "";
+ message.state = object.state ?? State.STATE_UNSPECIFIED;
+ message.uid = object.uid ?? "";
return message;
},
};
diff --git a/frontend/src/types/sqlEditor/tree.ts b/frontend/src/types/sqlEditor/tree.ts
index 110efc7f51..af9f776dfc 100644
--- a/frontend/src/types/sqlEditor/tree.ts
+++ b/frontend/src/types/sqlEditor/tree.ts
@@ -1,7 +1,8 @@
import type { TreeOption } from "naive-ui";
import { t } from "@/plugins/i18n";
import type { Environment } from "../proto/v1/environment_service";
-import type { ComposedDatabase, ComposedInstance } from "../v1";
+import type { InstanceResource } from "../proto/v1/instance_service";
+import type { ComposedDatabase } from "../v1";
export type SQLEditorTreeFactor =
| "instance"
@@ -26,7 +27,7 @@ export type LabelTarget = {
export type SQLEditorTreeNodeTarget<T extends SQLEditorTreeNodeType = any> =
T extends "instance"
- ? ComposedInstance
+ ? InstanceResource
: T extends "environment"
? Environment
: T extends "database"
@@ -107,7 +108,7 @@ export const isConnectableSQLEditorTreeNode = (
export const instanceOfSQLEditorTreeNode = (node: SQLEditorTreeNode) => {
const { type, target } = node.meta;
if (type === "instance") {
- return target as ComposedInstance;
+ return target as InstanceResource;
}
if (type === "database") {
return (target as ComposedDatabase).instanceResource;
diff --git a/frontend/src/utils/sqlEditor.ts b/frontend/src/utils/sqlEditor.ts
index affb5b09cb..3b08bb65ad 100644
--- a/frontend/src/utils/sqlEditor.ts
+++ b/frontend/src/utils/sqlEditor.ts
@@ -2,7 +2,7 @@ import dayjs from "dayjs";
import { v1 as uuidv1 } from "uuid";
import {
useDatabaseV1Store,
- useInstanceV1Store,
+ useInstanceResourceByName,
useSQLEditorTabStore,
} from "@/store";
import type {
@@ -90,13 +90,12 @@ export const isSimilarToDefaultSQLEditorTabTitle = (title: string) => {
export const suggestedTabTitleForSQLEditorConnection = (
conn: SQLEditorConnection
) => {
- const instance = useInstanceV1Store().getInstanceByName(conn.instance);
const database = useDatabaseV1Store().getDatabaseByName(conn.database);
const parts: string[] = [];
if (database.uid !== String(UNKNOWN_ID)) {
parts.push(database.databaseName);
- } else if (isValidInstanceName(instance.name)) {
- parts.push(instance.title);
+ } else if (isValidInstanceName(database.instance)) {
+ parts.push(database.instanceResource.title);
}
parts.push(defaultSQLEditorTabTitle());
return parts.join(" ");
@@ -107,7 +106,7 @@ export const isDisconnectedSQLEditorTab = (tab: SQLEditorTab) => {
if (!connection.instance) {
return true;
}
- const instance = useInstanceV1Store().getInstanceByName(connection.instance);
+ const instance = useInstanceResourceByName(connection.instance);
if (instanceV1AllowsCrossDatabaseQuery(instance)) {
// Connecting to instance directly.
return false;
diff --git a/frontend/src/utils/v1/instance.ts b/frontend/src/utils/v1/instance.ts
index 2b025089d9..09d6b7f679 100644
--- a/frontend/src/utils/v1/instance.ts
+++ b/frontend/src/utils/v1/instance.ts
@@ -1,6 +1,6 @@
import { keyBy, orderBy } from "lodash-es";
import { useI18n } from "vue-i18n";
-import { useSubscriptionV1Store } from "@/store";
+import { useEnvironmentV1Store, useSubscriptionV1Store } from "@/store";
import type { ComposedInstance } from "@/types";
import { isValidProjectName } from "@/types";
import { Engine, State } from "@/types/proto/v1/common";
@@ -35,11 +35,15 @@ export const extractInstanceResourceName = (name: string) => {
return matches?.[1] ?? "";
};
-export const sortInstanceV1List = (instanceList: ComposedInstance[]) => {
+export const sortInstanceV1List = (
+ instanceList: (ComposedInstance | InstanceResource)[]
+) => {
return orderBy(
instanceList,
[
- (instance) => instance.environmentEntity.order,
+ (instance) =>
+ useEnvironmentV1Store().getEnvironmentByName(instance.environment)
+ .order,
(instance) => instance.name,
(instance) => instance.title,
],
@@ -138,7 +142,7 @@ export const instanceV1HasReadonlyMode = (
};
export const instanceV1HasCreateDatabase = (
- instanceOrEngine: Instance | Engine
+ instanceOrEngine: Instance | InstanceResource | Engine
): boolean => {
const engine = engineOfInstanceV1(instanceOrEngine);
if (engine === Engine.REDIS) return false;
@@ -153,7 +157,7 @@ export const instanceV1HasCreateDatabase = (
};
export const instanceV1HasStructuredQueryResult = (
- instanceOrEngine: Instance | Engine
+ instanceOrEngine: Instance | InstanceResource | Engine
): boolean => {
const engine = engineOfInstanceV1(instanceOrEngine);
if (engine === Engine.REDIS) return false;
@@ -197,7 +201,7 @@ export const instanceV1HasSSH = (
};
export const instanceV1HasCollationAndCharacterSet = (
- instanceOrEngine: Instance | Engine
+ instanceOrEngine: Instance | Engine | InstanceResource
) => {
const engine = engineOfInstanceV1(instanceOrEngine);
@@ -214,7 +218,7 @@ export const instanceV1HasCollationAndCharacterSet = (
};
export const instanceV1AllowsCrossDatabaseQuery = (
- instanceOrEngine: Instance | Engine
+ instanceOrEngine: Instance | InstanceResource | Engine
) => {
const engine = engineOfInstanceV1(instanceOrEngine);
return [
diff --git a/frontend/src/utils/v1/sqlEditor.ts b/frontend/src/utils/v1/sqlEditor.ts
index 839e379015..442152b41a 100644
--- a/frontend/src/utils/v1/sqlEditor.ts
+++ b/frontend/src/utils/v1/sqlEditor.ts
@@ -1,17 +1,18 @@
import slug from "slug";
-import type { ComposedDatabase, ComposedInstance } from "@/types";
+import type { ComposedDatabase } from "@/types";
import { UNKNOWN_ID } from "@/types";
+import type { InstanceResource } from "@/types/proto/v1/instance_service";
const databaseV1Slug = (db: ComposedDatabase) => {
return [slug(db.databaseName), db.uid].join("-");
};
-const instanceV1Slug = (instance: ComposedInstance): string => {
+const instanceV1Slug = (instance: InstanceResource): string => {
return [slug(instance.title), instance.uid].join("-");
};
export function connectionV1Slug(
- instance: ComposedInstance,
+ instance: InstanceResource,
database?: ComposedDatabase
): string {
const parts = [instanceV1Slug(instance)];
diff --git a/frontend/src/views/InstanceDashboard.vue b/frontend/src/views/InstanceDashboard.vue
index e87cb2f3a9..95636a2f7b 100644
--- a/frontend/src/views/InstanceDashboard.vue
+++ b/frontend/src/views/InstanceDashboard.vue
@@ -52,7 +52,10 @@ const subscriptionStore = useSubscriptionV1Store();
const instanceV1Store = useInstanceV1Store();
const uiStateStore = useUIStateStore();
const environmentList = useEnvironmentV1List();
-const { instanceList: rawInstanceV1List, ready } = useInstanceV1List();
+const { instanceList: rawInstanceV1List, ready } = useInstanceV1List(
+ false, // showDeleted
+ true // forceUpdate
+);
const state = reactive<LocalState>({
params: {
diff --git a/frontend/src/views/sql-editor/AsidePanel/HistoryPane/HistoryConnectionIcon.vue b/frontend/src/views/sql-editor/AsidePanel/HistoryPane/HistoryConnectionIcon.vue
index fb84043924..6f50b1a95e 100644
--- a/frontend/src/views/sql-editor/AsidePanel/HistoryPane/HistoryConnectionIcon.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/HistoryPane/HistoryConnectionIcon.vue
@@ -10,7 +10,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { InstanceV1EngineIcon } from "@/components/v2";
-import { useInstanceV1Store } from "@/store";
+import { useDatabaseV1Store } from "@/store";
import { isValidInstanceName } from "@/types";
import type { QueryHistory } from "@/types/proto/v1/sql_service";
import { extractDatabaseResourceName } from "@/utils";
@@ -20,7 +20,8 @@ const props = defineProps<{
}>();
const instance = computed(() => {
- const { instance } = extractDatabaseResourceName(props.queryHistory.database);
- return useInstanceV1Store().getInstanceByName(instance);
+ const { database } = extractDatabaseResourceName(props.queryHistory.database);
+ const d = useDatabaseV1Store().getDatabaseByName(database);
+ return d.instanceResource;
});
</script>
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
index 956ea13c67..77b300f0c0 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
@@ -67,13 +67,13 @@ import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener
import {
useCurrentUserV1,
useDatabaseV1Store,
- useInstanceV1Store,
useIsLoggedIn,
useSQLEditorTabStore,
resolveOpeningDatabaseListFromSQLEditorTabList,
useSQLEditorTreeStore,
idForSQLEditorTreeNodeTarget,
useConnectionOfCurrentSQLEditorTab,
+ useInstanceResourceByName,
} from "@/store";
import type {
ComposedDatabase,
@@ -102,7 +102,6 @@ import { setConnection, useDropdown } from "./actions";
const treeStore = useSQLEditorTreeStore();
const tabStore = useSQLEditorTabStore();
const databaseStore = useDatabaseV1Store();
-const instanceStore = useInstanceV1Store();
const isLoggedIn = useIsLoggedIn();
const me = useCurrentUserV1();
@@ -147,7 +146,7 @@ const selectedKeys = computed(() => {
if (!node) return [];
return [node.key];
} else if (connection.instance) {
- const instance = instanceStore.getInstanceByName(connection.instance);
+ const instance = useInstanceResourceByName(connection.instance);
const nodes = treeStore.nodesByTarget("instance", instance);
return nodes.map((node) => node.key);
}
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/InstanceNode.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/InstanceNode.vue
index 97d5bc1efd..afc34b85f9 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/InstanceNode.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/TreeNode/InstanceNode.vue
@@ -3,7 +3,7 @@
<InstanceV1EngineIcon :instance="instance" />
<EnvironmentV1Name
v-if="!hasEnvironmentContext"
- :environment="instance.environmentEntity"
+ :environment="environment"
:link="false"
class="text-control-light"
/>
@@ -18,6 +18,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { EnvironmentV1Name, InstanceV1EngineIcon } from "@/components/v2";
+import { useEnvironmentV1Store } from "@/store";
import type {
SQLEditorTreeNode as TreeNode,
SQLEditorTreeFactor as Factor,
@@ -34,6 +35,10 @@ const instance = computed(
() => (props.node as TreeNode<"instance">).meta.target
);
+const environment = computed(() =>
+ useEnvironmentV1Store().getEnvironmentByName(instance.value.environment)
+);
+
const hasEnvironmentContext = computed(() => {
return props.factors.includes("environment");
});
diff --git a/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue b/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue
index 34a85d955f..be196d521c 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue
@@ -30,14 +30,16 @@ import { computed } from "vue";
import { useRouter } from "vue-router";
import { SQL_EDITOR_SETTING_INSTANCE_MODULE } from "@/router/sqlEditor";
import { useCurrentUserV1, useSQLEditorTabStore } from "@/store";
-import type { ComposedInstance } from "@/types";
import { isValidInstanceName } from "@/types";
-import { DataSourceType } from "@/types/proto/v1/instance_service";
+import {
+ DataSourceType,
+ InstanceResource,
+} from "@/types/proto/v1/instance_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import { useSidebarItems as useSettingItems } from "../Setting/Sidebar";
const props = defineProps<{
- instance: ComposedInstance;
+ instance: InstanceResource;
}>();
const tabStore = useSQLEditorTabStore();
diff --git a/frontend/src/views/sql-editor/EditorPanel/EditorPanel.vue b/frontend/src/views/sql-editor/EditorPanel/EditorPanel.vue
index f473e34c76..99759d76d0 100644
--- a/frontend/src/views/sql-editor/EditorPanel/EditorPanel.vue
+++ b/frontend/src/views/sql-editor/EditorPanel/EditorPanel.vue
@@ -40,7 +40,7 @@ import { defineAsyncComponent, watch } from "vue";
import { BBSpin } from "@/bbkit";
import { useExecuteSQL } from "@/composables/useExecuteSQL";
import { AIChatToSQL } from "@/plugins/ai";
-import { useInstanceV1Store, useSQLEditorTabStore } from "@/store";
+import { useDatabaseV1Store, useSQLEditorTabStore } from "@/store";
import type { SQLEditorConnection, SQLEditorQueryParams } from "@/types";
import {
EditorAction,
@@ -73,13 +73,13 @@ const handleApplyStatement = async (
}
tab.value.statement = statement;
if (run) {
- const instance = useInstanceV1Store().getInstanceByName(
- connection.instance
+ const database = useDatabaseV1Store().getDatabaseByName(
+ connection.database
);
handleExecute({
connection,
statement,
- engine: instance.engine,
+ engine: database.instanceResource.engine,
explain: false,
});
}
diff --git a/frontend/src/views/sql-editor/Setting/Instance/Instance.vue b/frontend/src/views/sql-editor/Setting/Instance/Instance.vue
index a38fe25390..3c68a9a0cf 100644
--- a/frontend/src/views/sql-editor/Setting/Instance/Instance.vue
+++ b/frontend/src/views/sql-editor/Setting/Instance/Instance.vue
@@ -103,6 +103,7 @@ const { t } = useI18n();
const subscriptionStore = useSubscriptionV1Store();
const instanceV1Store = useInstanceV1Store();
const environmentList = useEnvironmentV1List();
+// Users are workspace admins in Bytebase Editor. So we don't need to check permission here.
const { instanceList: rawInstanceV1List, ready } = useInstanceV1List(
/* showDeleted */ false,
/* forceUpdate */ true
diff --git a/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue b/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue
index 3ab63b7bd6..650329628a 100644
--- a/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue
+++ b/frontend/src/views/sql-editor/TabList/TabItem/AdminLabel.vue
@@ -1,10 +1,10 @@
<template>
<label class="flex items-center text-sm h-5 ml-0.5 whitespace-nowrap">
+ <EnvironmentV1Name
+ :environment="database.effectiveEnvironmentEntity"
+ :link="false"
+ />
<template v-if="isValidInstanceName(instance.name)">
- <EnvironmentV1Name
- :environment="instance.environmentEntity"
- :link="false"
- />
<heroicons-solid:chevron-right class="flex-shrink-0 h-4 w-4 opacity-70" />
<span>{{ instance.title }}</span>
</template>
@@ -19,7 +19,7 @@
import type { PropType } from "vue";
import { computed } from "vue";
import { EnvironmentV1Name } from "@/components/v2";
-import { useDatabaseV1Store, useInstanceV1Store } from "@/store";
+import { useDatabaseV1Store } from "@/store";
import type { SQLEditorTab } from "@/types";
import { UNKNOWN_ID, isValidInstanceName } from "@/types";
@@ -36,10 +36,10 @@ const props = defineProps({
const connection = computed(() => props.tab.connection);
-const instance = computed(() => {
- return useInstanceV1Store().getInstanceByName(connection.value.instance);
-});
const database = computed(() => {
return useDatabaseV1Store().getDatabaseByName(connection.value.database);
});
+const instance = computed(() => {
+ return database.value.instanceResource;
+});
</script>
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index bd51876ca9..d6cfaaa6b2 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -10496,6 +10496,16 @@ components:
description: |-
The environment resource.
Format: environments/prod where prod is the environment resource ID.
+ state:
+ enum:
+ - STATE_UNSPECIFIED
+ - ACTIVE
+ - DELETED
+ type: string
+ format: enum
+ uid:
+ readOnly: true
+ type: string
InstanceRole:
type: object
properties:
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index aa1af49641..c093ac19c8 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -2046,6 +2046,8 @@ InstanceOptions is the option for instances.
| activation | [bool](#bool) | | |
| name | [string](#string) | | The name of the instance. Format: instances/{instance} |
| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| state | [State](#bytebase-v1-State) | | |
+| uid | [string](#string) | | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 890d443aab..416eba887a 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -6393,6 +6393,20 @@ Format: instances/{instance} </p></td>
Format: environments/prod where prod is the environment resource ID. </p></td>
</tr>
+ <tr>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>uid</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.go
index 6d7cdebebf..85cf57e78d 100644
--- a/proto/generated-go/v1/instance_service.pb.go
+++ b/proto/generated-go/v1/instance_service.pb.go
@@ -1968,6 +1968,8 @@ type InstanceResource struct {
// The environment resource.
// Format: environments/prod where prod is the environment resource ID.
Environment string `protobuf:"bytes,7,opt,name=environment,proto3" json:"environment,omitempty"`
+ State State `protobuf:"varint,8,opt,name=state,proto3,enum=bytebase.v1.State" json:"state,omitempty"`
+ Uid string `protobuf:"bytes,9,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *InstanceResource) Reset() {
@@ -2051,6 +2053,20 @@ func (x *InstanceResource) GetEnvironment() string {
return ""
}
+func (x *InstanceResource) GetState() State {
+ if x != nil {
+ return x.State
+ }
+ return State_STATE_UNSPECIFIED
+}
+
+func (x *InstanceResource) GetUid() string {
+ if x != nil {
+ return x.Uid
+ }
+ return ""
+}
+
type SASLConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2673,7 +2689,7 @@ var file_v1_instance_service_proto_rawDesc = []byte{
0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x4c, 0x4f, 0x4e, 0x45, 0x10, 0x01,
0x12, 0x0c, 0x0a, 0x08, 0x53, 0x45, 0x4e, 0x54, 0x49, 0x4e, 0x45, 0x4c, 0x10, 0x02, 0x12, 0x0b,
- 0x0a, 0x07, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x10, 0x03, 0x22, 0x94, 0x02, 0x0a, 0x10,
+ 0x0a, 0x07, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x10, 0x03, 0x22, 0xd6, 0x02, 0x0a, 0x10,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65,
@@ -2691,166 +2707,170 @@ var file_v1_instance_service_proto_rawDesc = []byte{
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,
- 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0a, 0x53, 0x41, 0x53, 0x4c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x12, 0x3c, 0x0a, 0x0a, 0x6b, 0x72, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x72, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0b,
- 0x0a, 0x09, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x22, 0xe0, 0x01, 0x0a, 0x0e,
- 0x4b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18,
- 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74,
- 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74,
- 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65,
- 0x79, 0x74, 0x61, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x74,
- 0x61, 0x62, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x64, 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x64, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x19, 0x0a,
- 0x08, 0x6b, 0x64, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x07, 0x6b, 0x64, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6b, 0x64, 0x63, 0x5f,
- 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
- 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6b, 0x64, 0x63, 0x54, 0x72, 0x61,
- 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2a, 0x47,
- 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
- 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f,
- 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a,
- 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44,
- 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x32, 0xd0, 0x10, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74,
- 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x0b,
- 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73,
+ 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x03,
+ 0x75, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52,
+ 0x03, 0x75, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x0a, 0x53, 0x41, 0x53, 0x4c, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x0a, 0x6b, 0x72, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f, 0x73, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x72, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x42, 0x0b, 0x0a, 0x09, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x22, 0xe0, 0x01,
+ 0x0a, 0x0e, 0x4b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x16, 0x0a, 0x06,
+ 0x6b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6b, 0x65,
+ 0x79, 0x74, 0x61, 0x62, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x64, 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x64, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x12,
+ 0x19, 0x0a, 0x08, 0x6b, 0x64, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x07, 0x6b, 0x64, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6b, 0x64,
+ 0x63, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6b, 0x64, 0x63, 0x54,
+ 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
+ 0x2a, 0x47, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43,
+ 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
+ 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45,
+ 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x32, 0xd0, 0x10, 0x0a, 0x0f, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01,
+ 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x3d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea,
+ 0x30, 0x10, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x67,
+ 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0xda,
+ 0x41, 0x00, 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x34, 0x5a, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61,
+ 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0xda, 0x41, 0x00, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x42, 0x5a, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12,
+ 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x73,
+ 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x92, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62,
0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x22, 0x3d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x10,
- 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x67, 0x65, 0x74,
- 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,
- 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0xda, 0x41, 0x00,
- 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
- 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x5a,
- 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70,
- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x73, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73, 0x74,
- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
- 0x68, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x22, 0x4f, 0xda, 0x41, 0x00, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x42, 0x5a, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2f,
- 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61,
- 0x72, 0x63, 0x68, 0x12, 0x92, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x22, 0x45, 0xda, 0x41, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x8a, 0xea,
- 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x63,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a,
- 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x63, 0xda, 0x41, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a,
- 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b,
- 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x32, 0x1f, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x0e,
- 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x40, 0xda, 0x41, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a,
- 0x10, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x47,
- 0x8a, 0xea, 0x30, 0x15, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
- 0x2e, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75,
- 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63,
- 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74,
+ 0x6e, 0x63, 0x65, 0x22, 0x45, 0xda, 0x41, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
+ 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x19, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x0d, 0x2f, 0x76, 0x31,
+ 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x0e, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x63, 0xda, 0x41, 0x14, 0x69, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,
+ 0x6b, 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x2b, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x32, 0x1f, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01,
+ 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x40, 0xda, 0x41,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x98,
+ 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+ 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x22, 0x47, 0x8a, 0xea, 0x30, 0x15, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x2e, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0c, 0x53, 0x79,
+ 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74,
0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x8a,
- 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e,
- 0x73, 0x79, 0x6e, 0x63, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01,
- 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x12, 0xa2,
- 0x01, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74,
- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63,
- 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x90, 0xea, 0x30,
- 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f,
- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53,
- 0x79, 0x6e, 0x63, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x3f, 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x73, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20,
+ 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63,
+ 0x12, 0xa2, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61,
+ 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62,
+ 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x90,
+ 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76,
+ 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63,
+ 0x68, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74,
+ 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x22, 0x4a, 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+ 0x63, 0x65, 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,
+ 0x61, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x9e, 0x01,
+ 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22,
- 0x4a, 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x4d, 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x64,
- 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x10,
- 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52,
- 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x4d, 0x8a,
- 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c,
- 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f,
- 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a,
- 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x4d,
- 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
- 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x2c, 0x3a, 0x01, 0x2a, 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0xca, 0x01,
- 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65,
- 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x7a,
- 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
- 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5b, 0x3a,
- 0x01, 0x2a, 0x5a, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61,
- 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d,
- 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73,
- 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x53,
- 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65,
+ 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x9e,
+ 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x22, 0x4d, 0x8a, 0xea, 0x30, 0x13, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
+ 0xca, 0x01, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72,
+ 0x69, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x7a, 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x5b, 0x3a, 0x01, 0x2a, 0x5a, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69,
+ 0x65, 0x73, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d,
+ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e,
+ 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x42, 0x11, 0x5a, 0x0f,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62,
+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2933,39 +2953,40 @@ var file_v1_instance_service_proto_depIdxs = []int32{
5, // 23: bytebase.v1.DataSource.redis_type:type_name -> bytebase.v1.DataSource.RedisType
35, // 24: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine
26, // 25: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource
- 29, // 26: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig
- 3, // 27: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType
- 6, // 28: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest
- 7, // 29: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest
- 9, // 30: bytebase.v1.InstanceService.SearchInstances:input_type -> bytebase.v1.SearchInstancesRequest
- 11, // 31: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest
- 12, // 32: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest
- 13, // 33: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest
- 14, // 34: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest
- 15, // 35: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest
- 17, // 36: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest
- 19, // 37: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest
- 20, // 38: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest
- 21, // 39: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest
- 22, // 40: bytebase.v1.InstanceService.SyncSlowQueries:input_type -> bytebase.v1.SyncSlowQueriesRequest
- 24, // 41: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance
- 8, // 42: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse
- 10, // 43: bytebase.v1.InstanceService.SearchInstances:output_type -> bytebase.v1.SearchInstancesResponse
- 24, // 44: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance
- 24, // 45: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance
- 36, // 46: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty
- 24, // 47: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance
- 16, // 48: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse
- 18, // 49: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse
- 24, // 50: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance
- 24, // 51: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance
- 24, // 52: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance
- 36, // 53: bytebase.v1.InstanceService.SyncSlowQueries:output_type -> google.protobuf.Empty
- 41, // [41:54] is the sub-list for method output_type
- 28, // [28:41] is the sub-list for method input_type
- 28, // [28:28] is the sub-list for extension type_name
- 28, // [28:28] is the sub-list for extension extendee
- 0, // [0:28] is the sub-list for field type_name
+ 34, // 26: bytebase.v1.InstanceResource.state:type_name -> bytebase.v1.State
+ 29, // 27: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig
+ 3, // 28: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType
+ 6, // 29: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest
+ 7, // 30: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest
+ 9, // 31: bytebase.v1.InstanceService.SearchInstances:input_type -> bytebase.v1.SearchInstancesRequest
+ 11, // 32: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest
+ 12, // 33: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest
+ 13, // 34: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest
+ 14, // 35: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest
+ 15, // 36: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest
+ 17, // 37: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest
+ 19, // 38: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest
+ 20, // 39: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest
+ 21, // 40: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest
+ 22, // 41: bytebase.v1.InstanceService.SyncSlowQueries:input_type -> bytebase.v1.SyncSlowQueriesRequest
+ 24, // 42: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance
+ 8, // 43: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse
+ 10, // 44: bytebase.v1.InstanceService.SearchInstances:output_type -> bytebase.v1.SearchInstancesResponse
+ 24, // 45: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance
+ 24, // 46: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance
+ 36, // 47: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty
+ 24, // 48: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance
+ 16, // 49: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse
+ 18, // 50: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse
+ 24, // 51: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance
+ 24, // 52: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance
+ 24, // 53: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance
+ 36, // 54: bytebase.v1.InstanceService.SyncSlowQueries:output_type -> google.protobuf.Empty
+ 42, // [42:55] is the sub-list for method output_type
+ 29, // [29:42] is the sub-list for method input_type
+ 29, // [29:29] is the sub-list for extension type_name
+ 29, // [29:29] is the sub-list for extension extendee
+ 0, // [0:29] is the sub-list for field type_name
}
func init() { file_v1_instance_service_proto_init() }
diff --git a/proto/v1/instance_service.proto b/proto/v1/instance_service.proto
index ebd810d683..1106939684 100644
--- a/proto/v1/instance_service.proto
+++ b/proto/v1/instance_service.proto
@@ -527,6 +527,10 @@ message InstanceResource {
// The environment resource.
// Format: environments/prod where prod is the environment resource ID.
string environment = 7;
+
+ State state = 8;
+
+ string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message SASLConfig {