Мастер, шаг 3 DEPO: подключение → трансферные таблицы → обработка (job); по умолчанию джобу SQL Agent создаёт bj разовым логином администратора
- редакция SQL Server определяется (Express/PostgreSQL — обработку запускает bj); - создание джобы и таблиц — логином администратора, который не сохраняется; - настройки обмена с DEPO открыты без пароля перспективных модулей, если QUIK МНП в лицензии. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
@@ -65,7 +65,7 @@ func (h *setupHandlers) fancyFromForm(r *http.Request) FancyMSSQLSettings {
|
||||
|
||||
// saveFancyDepoTables — POST /admin/setup/fancy/depo-tables: база DEPO и способ создания таблиц.
|
||||
func (h *setupHandlers) saveFancyDepoTables(w http.ResponseWriter, r *http.Request) {
|
||||
if !requireAdvanced(w, r) {
|
||||
if !requireDepo(w, r) {
|
||||
return
|
||||
}
|
||||
if r.Method != http.MethodPost {
|
||||
@@ -112,7 +112,7 @@ func (h *setupHandlers) saveDepoTablesCheck(msg string, ok bool) {
|
||||
// createFancyDepoTables — POST /admin/setup/fancy/depo-tables/create: bj создаёт таблицы сам.
|
||||
// Логин с правами берётся из формы и нигде не сохраняется.
|
||||
func (h *setupHandlers) createFancyDepoTables(w http.ResponseWriter, r *http.Request) {
|
||||
if !requireAdvanced(w, r) {
|
||||
if !requireDepo(w, r) {
|
||||
return
|
||||
}
|
||||
if r.Method != http.MethodPost {
|
||||
@@ -181,7 +181,7 @@ func (h *setupHandlers) fancyDepoTablesScript(w http.ResponseWriter, r *http.Req
|
||||
|
||||
// saveFancyDepoJob — POST /admin/setup/fancy/depo-job: обработка трансферных таблиц силами bj.
|
||||
func (h *setupHandlers) saveFancyDepoJob(w http.ResponseWriter, r *http.Request) {
|
||||
if !requireAdvanced(w, r) {
|
||||
if !requireDepo(w, r) {
|
||||
return
|
||||
}
|
||||
if r.Method != http.MethodPost {
|
||||
@@ -226,7 +226,7 @@ func (h *setupHandlers) saveFancyDepoJob(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
// checkFancyDepoJob — POST /admin/setup/fancy/depo-job/check: проверка готовности выбранного способа.
|
||||
func (h *setupHandlers) checkFancyDepoJob(w http.ResponseWriter, r *http.Request) {
|
||||
if !requireAdvanced(w, r) {
|
||||
if !requireDepo(w, r) {
|
||||
return
|
||||
}
|
||||
if r.Method != http.MethodPost {
|
||||
@@ -248,7 +248,7 @@ func (h *setupHandlers) checkFancyDepoJob(w http.ResponseWriter, r *http.Request
|
||||
|
||||
// createFancyDepoJob — POST /admin/setup/fancy/depo-job/create: создать джобу SQL Agent от имени bj.
|
||||
func (h *setupHandlers) createFancyDepoJob(w http.ResponseWriter, r *http.Request) {
|
||||
if !requireAdvanced(w, r) {
|
||||
if !requireDepo(w, r) {
|
||||
return
|
||||
}
|
||||
if r.Method != http.MethodPost {
|
||||
@@ -257,7 +257,7 @@ func (h *setupHandlers) createFancyDepoJob(w http.ResponseWriter, r *http.Reques
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second)
|
||||
defer cancel()
|
||||
if err := depoJobCreateAgent(ctx, h.rc); err != nil {
|
||||
if err := depoJobCreateAgent(ctx, h.rc, r.FormValue("admin_user"), r.FormValue("admin_password")); err != nil {
|
||||
setupFlash(w, r, "Создание джобы: "+err.Error())
|
||||
return
|
||||
}
|
||||
@@ -270,7 +270,7 @@ func (h *setupHandlers) createFancyDepoJob(w http.ResponseWriter, r *http.Reques
|
||||
|
||||
// saveFancy — POST /admin/setup/fancy. Сохраняет параметры подключения.
|
||||
func (h *setupHandlers) saveFancy(w http.ResponseWriter, r *http.Request) {
|
||||
if !requireAdvanced(w, r) {
|
||||
if !requireDepo(w, r) {
|
||||
return
|
||||
}
|
||||
if r.Method != http.MethodPost {
|
||||
|
||||
Reference in New Issue
Block a user